Bug 57775

Summary: XSSFSheetXMLHandler does not generate event for empty cells
Product: POI Reporter: Jan Palus <jan.palus>
Component: XSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.11-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Jan Palus 2015-03-29 00:14:39 UTC
I'm parsing big XLSX file using XSSFSheetXMLHandler and its SheetContentsHandler interface. The crucial thing though is to track column number to which reported cell belongs. Unfortunately if cell is empty there is no event generated and hence column number cannot be tracked. Please raise cell() event with formattedValue = null / "" or provide option to do so. Codewise to report cell() event it is required to have some additional value tag between <c></c> while in case of empty cells there is none.
Comment 1 Nick Burch 2015-03-29 03:16:59 UTC
This is by design, it returns only the cells physically present in the file

https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java provides an example of the handful of lines of code needed to track + process missing cells. Exactly how to process them, how many columns to generate missing cells for, handling missing cells at the end of the row etc are application-specific decisions, so you need to do that yourself