Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9069

Re: Reg: uploading data through excel 2010 Version

$
0
0

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:

importorg.apache.poi.hssf.usermodel.HSSFSheet; // for Excel 2007

importorg.apache.poi.xssf.usermodel.XSSFSheet; // for Excel 2010

//..

FileInputStream file = newFileInputStream(newFile("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

 


Viewing all articles
Browse latest Browse all 9069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>