I am using POI 3.5 Beta: - while opening an Excel 2003 document it took about 700 milliseconds. - while opening an Excel 2007 document it took 3000 milliseconds. (It is 4 times slower) Would you help on solving this issue? And please let me know if you have any other advice which will help to resolve this issue. Thanks a lot!
Opening an Excel 2003 document: FileInputStream fis = new FileInputStream(path); POIFSFileSystem fs = new POIFSFileSystem(fis); Workbook workbook = new HSSFWorkbook(fs); -- Opening an Excel 2007 document: Workbook workbook = new XSSFWorkbook(path);
Opening *.xlsx files will always be slower that opening *.xls just because parsing XML is always slower than reading binary data. We use the XMLBeans technology (http://xmlbeans.apache.org/) to map XML to Java and takes quite some time to process OOXML documents. A possible workaround is to use XSSF Event API: http://poi.apache.org/spreadsheet/how-to.html#xssf_sax_api. It requires basic understanding of the file structure but allows processing *.xlsx with low memory footprint and much faster than using XSSF usermodel API. Yegor