wood burning stoves 2.0*
The moose likes Servlets and the fly likes Reading Data from Excel Sheets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Reading Data from Excel Sheets" Watch "Reading Data from Excel Sheets" New topic
Author

Reading Data from Excel Sheets

P Jain
Ranch Hand

Joined: Jul 31, 2004
Posts: 52
Hi!
I have an Excel Sheet that contains different Columns such as

SCRIPT and RESULT

I have to read data from SCRIPT column and write some data in RESULT column.
This Excel Sheet contains 10 rows.

How do I can read data (from specific column) from Excel Sheet and then write in the (specific column) Excel Sheet.


Regards<br />P Jain
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

This seems to be an operation contained in Excel - in which case why not do it with Excel formulae or VBA?

If you need to handle it through Java, probably the easiest route is with Jakarta POI.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
P Jain
Ranch Hand

Joined: Jul 31, 2004
Posts: 52
Hi!
Thanks for youe reply
But can I access excel file (especially csv) by using simple java.
Or it is necessary to use JDBC for this.
Because normally when we have to access text file we don't use JDBC.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There is no native support for Excel built into Java but you can certainly parse a csv file.

Look either at Java's regexp support (1.4 or higher) or the java.util.StringTokenizer for older versions.

The java.io.BufferedReader(java.io.FileReader)
has a readLine method.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading Data from Excel Sheets