When I create a new excel abc.xlsx Create a new sheet "test" Add a cell value in "C20" Then I try to use XSSF and SAX (Event API) to read this xml. I can only get the 1 row value. <sheetData> <row r="20" spans="3:3" x14ac:dyDescent="0.25"> <c r="C20" t="s"> <v>0</v> </c> </row> </sheetData> Can't find a way to get the empty rows 1~19. I use this example to test my data. https://github.com/apache/poi/blob/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java#L73~L74 Just change it write xml to a local file
Excel files are normally (mostly) sparse, so this is entirely as expected All rows and cells come with details of what one they are, so with 2 counters you can easily spot gaps. See https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java for an easy-to-read example of doing this Alternately, switch to the full UserModel code, and there's handy helpers there to assist you in dealing with missing cells etc
Thanks Nick, I would try with you suggestion. Seems I forgot to check in latest examples.