• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading Data from Excel Sheets

 
P Jain
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
P Jain
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic