Estoy tratando de leer un archivo xls usando SXSSF. He leído sobre SXSSF, pero no entiendo exactamente cómo usarlo. Entonces estoy teniendo algunos problemas.Cómo usar POI SXSSF para leer una hoja de cálculo grande
¿Alguien me puede ayudar con el código de java para leer archivos xls grandes (unas 100.000 filas y 7-8 hojas).
(Editar en los comentarios)
Esto es lo que he intentado:
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);
}
}
[¿Qué has intentado?] (Http://mattgemmell.com/2008/12/08/what-have-you-tried/) [ Esto] (http://stackoverflow.com/questions/4752456/memory-efficient-java-library-to-read-excel-files) o [That] (http://stackoverflow.com/questions/4085517/which- is-the-best-api-to-read-large-sized-excel-files-in-java) por ejemplo? – nobeh
He intentado algo como esto ..... – abhi
Workbook workBook = new SXSSFWorkbook (200); workBook = WorkbookFactory.create (inputStream); Sheet sheet = workBook.getSheetAt (0); int totalRows = sheet.getPhysicalNumberOfRows(); for (int i = 0; i
abhi