This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Reading Excel sheet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Reading Excel sheet" Watch "Reading Excel sheet" New topic
Author

Reading Excel sheet

Balaji Natarajan
Greenhorn

Joined: Dec 05, 2002
Posts: 28
Hi
I searched for the above mentioned subject in this forum and I came to know about POI-HSSF for handling excel sheets from java. But I am not able to find the exact location to download the necessary jars. Could anyone tell me the exact link for that.
Thanks in advance
Balaji.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
I believe the answer you desire lies in what we experts call "search engines."
http://jakarta.apache.org/poi/hssf/


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Balaji Natarajan
Greenhorn

Joined: Dec 05, 2002
Posts: 28
Thanks Nathaniel, Here is the exact link for the files.
http://mirrors.mix5.com/apache/jakarta/poi/release/bin
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
In addition, if the Excel is in CSV format, Java can read it directly, and process the data accordingly.
Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Jeremy Wilson
Ranch Hand

Joined: Feb 18, 2003
Posts: 166
The easiest way I have found to read from an excel spreadsheet is with JDBC/ODBC bridge. The sun driver is included with Java 1.4.1 SDK. You use the JDBC api as with any other standard RDBMS. For instance if you wanted to read sheet 1's columns you would use a select statement like
"select * from [sheet1name$]"
The only issue is the [$] must be in that format for the table name. You can use the first row as the column names and access certain columns in the select statement.
You then process the returned ResultSet as normal.


Jeremy Wilson
 
 
subject: Reading Excel sheet
 
Similar Threads
JSP-EXCEL save defualt in .xls extension, open excel with in the browser
Will swing help me?
Copy particular rows in excel using POI
Excel Float value problem
Exporting data to excel file... using java web app