How to read Excel file using Java code

Hi,I'm new java. Can anyone give me a sample code for read the whole contents in Excel (.xls) file using a java code. I'm really waiting for your code. Thanks ...
[185 byte] By [ggopia] at [2007-11-27 6:32:40]
# 1
There are third party libs out there that can do what you want. Or you can treat an excel spreadsheet like a database and query it with standard sql statements. You will need to read up on JDBC for this.
floundera at 2007-7-12 17:58:17 > top of Java-index,Java Essentials,New To Java...
# 2

> There are third party libs out there that can do what

> you want. Or you can treat an excel spreadsheet like

> a database and query it with standard sql statements.

> You will need to read up on JDBC for this.

Without JDBC we can't do this thing.. ? Because I'm already having some contents in my excel sheet, Now I have to fetch those data's and I have to do some calculations there. That's why I'm asking you..

ggopia at 2007-7-12 17:58:17 > top of Java-index,Java Essentials,New To Java...
# 3
I'm not going to provide you with code, especially since I have no idea what specific queries you need to make.Have you tried writing the sql statements? Do you know what classes you need? You initial question is just too broad to provide an adequate answer.
floundera at 2007-7-12 17:58:17 > top of Java-index,Java Essentials,New To Java...
# 4
The easiest way may be to feed the excel file into a databae then read back into Java from the database.
Jamwaa at 2007-7-12 17:58:17 > top of Java-index,Java Essentials,New To Java...
# 5
Hi,You can use Apache POI framework for any reading and writing from/into .xls file. Go to the Apache site, you will get the all the tutorials for reading from .xls file
DebadattaMishraa at 2007-7-12 17:58:17 > top of Java-index,Java Essentials,New To Java...