dcsimg
How to read an Excel file
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vijay_varanasi
Posted On:   Thursday, October 21, 2004 02:03 AM

How to read an Excel file

Re: How to read an Excel file

Posted By:   atul_gupta  
Posted On:   Thursday, December 23, 2004 11:46 PM

using "POI API" third party api provided by jakarta apache servers....

Re: How to read an Excel file

Posted By:   jacky_gu  
Posted On:   Monday, December 20, 2004 06:37 PM


/**

*please download the package jxl.jar from

*http://jakarta.apache.org/

*/

//open excel file

java.io.File f=new java.io.File(file);

jxl.Workbook workbook=null;

jxl.Sheet sheet=null;

try{

workbook=jxl.Workbook.getWorkbook(f);

sheet=workbook.getSheet(0);

}catch(Exception ex){

}

//read a certain cell

String xx="";

xx=sheet.getCell(j,i).getContents().trim();

//j:columnindex,i:rowindex


Re: How to read an Excel file

Posted By:   Stephen_Ostermiller  
Posted On:   Thursday, October 21, 2004 03:28 AM

If you go for CSV, there are libraries to read Excel CSV format:


http://ostermiller.org/utils/ExcelCSV.html

Re: How to read an Excel file

Posted By:   Anonymous  
Posted On:   Thursday, October 21, 2004 03:00 AM

Maybe the Apache POI project could help. In my own program I wrote an Excel macro for exporting the data to CSV - much more easier to read ...
About | Sitemap | Contact