Bug 57775 - XSSFSheetXMLHandler does not generate event for empty cells
Summary: XSSFSheetXMLHandler does not generate event for empty cells
Status: RESOLVED WONTFIX
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.11-FINAL
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-29 00:14 UTC by Jan Palus
Modified: 2015-03-29 03:16 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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