hi all,
I have a tool programmed, which can open the Excel files with .xlsx Format.
My POI use the "ss" classes to open the Files. My Main use;
---
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
---
and my another Class use;
--
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
--
Up to here all went well. But wenn i want to open with this tool a file with
.xls (old format), there is a problem;
--
Exception in thread "main" org.apache.poi.hssf.OldExcelFormatException: The
supplied spreadsheet seems to be Excel 5.0/7.0 (BIFF5) format. POI only
supports BIFF8 format (from Excel versions 97/2000/XP/2003)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getWorkbookDirEntryName(HSSFWorkbook.java:216)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:263)
at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:88)
at packageVal.userInterface.main(userInterface.java:29)
--
I understand this problem--POI only supports BIFF8 format--! But what i
didn't understand, why "ss" can't open .xls file. "ss" can open both file
formats or not?! Where is the problem and how to solve it? Any Idea?
Thanks in advance!
sars
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/xls-file-can-t-open-with-ss-usermodel-tp5711871.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]