poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <apa...@gagravarr.org>
Subject Re: Query about WorkbookFactory.create(input)
Date Thu, 29 Oct 2015 09:55:52 GMT
On Thu, 29 Oct 2015, Rohit Cha wrote:
> Does WorkbookFactory.create(input) can read both excel-2003 and excel-2007
> with out any exception or do we need to use xssf and hssf seperately for
> each one
>
> FileInputStream input = new FileInputStream(
> "/Users/Desktop/Spice+tool.xls");
>
> Workbook wb = WorkbookFactory.create(input);

As per http://poi.apache.org/spreadsheet/quick-guide.html#FileInputStream 
you should just pass in the file directly - it's quicker and lower memory!

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message