On Fri, 31 May 2013, vijay wrote:
I'm big big fan of apache Poi, I used it for reading/writing excel
before. Now I want to use apache poi for reading a macro for my project.
Agreed my macro has 10 sheets but creating workbook oibject is taking
too long.
FileInputStream file = new FileInputStream(new File("C:\\test.xlsm"));
XSSFWorkbook wb = new XSSFWorkbook(file);
If you have a file, don't go via an inputstream! It increases the amount
of memory needed, and slows things down. See
http://poi.apache.org/spreadsheet/quick-guide.html#FileInputStream
Other than that, when you're using a file, if it's still slow you'll need
to use a profiler to check what code is the problem.
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]