Bug 55107

Summary: Problem reading formatted cel in Excel
Product: POI Reporter: csaghira
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P2    
Version: 3.8-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Test Excel File

Description csaghira 2013-06-17 13:50:38 UTC
Created attachment 30447 [details]
Test Excel File

A cell in excel is being skipped and not read at all using XSSFWorkbook and getSheetAt. The cell seems to have a special formatting. Is this a limitation? Please find attached the test case excel file. Note how B2 is skipped.

This is the code:

import org.apache.poi.xssf.usermodel.*
import org.apache.poi.ss.usermodel.*

//Excel .xlsx
Workbook wbx = new XSSFWorkbook("test.xlsx")
XSSFSheet sheetx = wbx.getSheetAt(0); 
              
//Get Values from Excel
for (XSSFRow rowx : sheetx) {
    println rowx    
}
Comment 1 Dominik Stadler 2015-10-01 14:41:42 UTC
The Excel file that you attached contains a cell for B1 which has no value and contains no cell at B2 at all. Note that the file format only contains cells after they were written to, obviously they can stay after they were made empty again. 

So the result that you see is expected as far as I see.