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()); }
Created attachment 30096 [details] Test File
Everything prior to getRow() works ok. I debugged and was able to see that the workbook and sheet were returned ok. Just couldn't get the row. Always returned null.
SXSSFWorkbook is write/append only. It does not support reading To read a .xlsx file, you need to use the regular XSSFWorkbook (or low level event/SAX processing)
Thanks!