Felix, Nick: thank you for your prompt response. I didn't even expect to get an answer THAT quickly... ;-)
In my current implementation, I was instantiating HSSFWorkbook, but from what Nick has been saying is that the proper approach is to use the WorkbookFactory. I need to be able to read XLS and XLSX files, so I guess the factory would be more appropriate. Since I am new to POI, could you please give me a snippet of code to use the factory and also elaborate on what other Excel file formats the package works with? Any help would be greatly appreciated, Pavel. -----Original Message----- From: Nick Burch [mailto:[email protected]] Sent: Monday, October 01, 2012 2:17 PM To: POI Users List Subject: Re: XLS and XLSX On Mon, 1 Oct 2012, Pavel Bortnovskiy wrote: >> From the docs, in order to read XLSX I would need to instantiate >> SXSSFWorkbook, but it's not available in the package. I'm not sure what docs you were reading - SXSSF is for writing only! You probably want either XSSFWorkbook or WorkbookFactory, depending on if you want to do XLSX only, or handle both You should probably also read http://poi.apache.org/spreadsheet/converting.html for information on changing your HSSF code to work with both Nick --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Jefferies archives and monitors outgoing and incoming e-mail. The contents of this email, including any attachments, are confidential to the ordinary user of the email address to which it was addressed. If you are not the addressee of this email you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. This email may be produced at the request of regulators or in connection with civil litigation. Jefferies accepts no liability for any errors or omissions arising as a result of transmission. Use by other than intended recipients is prohibited. In the United Kingdom, Jefferies operates as Jefferies International Limited; registered in England: no. 1978621; registered office: Vintners Place, 68 Upper Thames Street, London EC4V 3BJ. Jefferies International Limited is authorised and regulated by the Financial Services Authority. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
