on 08-30-2013 6:38 PM
Hello,
We are uploading the data through excel 2007 version, Now my client wants ask to upload the data in either of the version(2007 to 2010) of excel.
Could you plz share any sample example to upload the data in excel 2010.
Do we get any errors if we convert 2007 to 2010 version if so,? how to solve it
Which jar files will support to 2010 and below versions?
Please do needful help.
Thanks in advance
Vijay
Try to use the apache POI jar file. It should support the latest versions of excel.
Regards,
Sharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for replying, as of now i am using "poi-3.7-20101029.jar" file for uploading excel-2007 version.
Client will upload either excel-2007 or excel-2010 version.(means both versions suitable for uploading excel) So, Which Apache POI is suitable for both versions.
Working with .xlsx files
The classes we used in above code snippet, HSSFWorkbook and HSSFSheet works for .xls format. In order to work with newer xls format viz .xlsx, you need to see newer POI classes like:
import org.apache.poi.hssf.usermodel.HSSFSheet; // for Excel 2007 import org.apache.poi.xssf.usermodel.XSSFSheet; // for Excel 2010 //.. FileInputStream file = new FileInputStream(new File("C:\\test.xlsx")); |
Use XSSFWorkbook and XSSFSheet class in all of the below examples in order to make them work with .xlsx files.
So, for uploading both versions of excels which Apache POI Version is suitable for both versions of excel(2007,2010)?
Is it possible for uploading both version of excel(2007 or 2010) by Apache POI?
Thank you,
Regards
Vijay
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.