I am trying to read an xls file using SXSSF. I read about SXSSF but don't understand how to use it. Therefore, I am facing some problems.
Can someone help me with java code for reading large xls files (about 100,000 lines and 7-8 sheets).
(Edit comments)
Here is what I tried:
Workbook workBook = new SXSSFWorkbook(200); workBook = WorkbookFactory.create(inputStream); Sheet sheet = workBook.getSheetAt(0); int totalRows = sheet.getPhysicalNumberOfRows(); for (int i=0; i<totalRows; i++) { Row row = sheet.getRow(i); int totalCols = row.getPhysicalNumberOfCells(); for(int j=0; j<totalCols; j++) { Cell cell = row.getCell(j); } }
abhi
source share