https://issues.apache.org/bugzilla/show_bug.cgi?id=54743
Bug ID: 54743
Summary: getrow() returns null even though there's data in the
file.
Product: POI
Version: unspecified
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Here's the code:
SXSSFWorkbook wb;
Sheet sheet;
Row r;
Cell cell;
InputStream inp;
try {
inp = new FileInputStream(sFileName);
wb = new SXSSFWorkbook(new XSSFWorkbook(inp));
cell = wb.getSheetAt(0).getRow(0).getCell(0);
if(cell != null) {
sOutput = cell.getStringCellValue();
sOutput = sOutput + " in here!";
} else {
sOutput = "Nothing";
}
System.out.println(sOutput);
inp.close();
}
catch(FileNotFoundException ex) {
System.out.println(ex.getMessage());
}
catch(IOException | NullPointerException ex) {
System.out.println(ex.getMessage());
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]