Can XSSF open Excel 2003?

Nov 11, 2012 at 12:29 PM

Hi All,

I can use NOPI.XSSF to read Excel 2007 files. And then I downgrade save the Excel 2007 version, and try to use NOPI.XSSF to read Excel 2003 file, but it fails.  Is it as designed? 

I want to open/write both Excel 2003 and Excel 2007 files, is it possible? 

Thanks

-Jerry

Coordinator
Nov 22, 2012 at 9:11 PM

Please use NPOI.SS.UserModel.WorkbookFactory. It will automatically determine which type of Excel files are you importing and return you the correct object(HSSFWorkbook or XSSFWorkbook). Actually, it will return you IWorkbook, which hides the details of real object.

Dec 2, 2012 at 10:29 AM

Hi Tony,

Thanks for your suggestion.  Your suggestion works.