简体   繁体   中英

Does XSSFWorkbook,XSSFSheet work with office 2003 and office 2007

I'm using following lines to work with Office 2010 Excel file:

XSSFWorkbook myWorkBook = new XSSFWorkbook(new FileInputStream(file));

XSSFSheet mySheet = myWorkBook.getSheetAt(0);

Iterator<Row> rows = mySheet.rowIterator(); 

I was wondering if that will work with Office 2003 and Office 2007 (backward compatibility), or I will have to change the implementation, if it will not work, then how can i know the version of the excel file, and how will the implementation change?

It only works with office 2003, if Microsofts compatibility pack is installed or you create an HSSF output. Office 2007 should be no problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM