944,117 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 23150
  • Java RSS
Dec 11th, 2006
-1

how to read CSV file in java

Expand Post »
hi , can anyone tell me how to read contents of a CSV file into my java string. and how to convert a CSV file to a Excel file in java .
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
josephmca77 is offline Offline
1 posts
since Dec 2006
Dec 11th, 2006
0

Re: how to read CSV file in java

hi , can anyone tell me how to read contents of a CSV file into my java string. and how to convert a CSV file to a Excel file in java .
To read in a csv file, would be just the same as reading in a normal text file.

You would just use the split() method to separate your lines by the commas.

Converting a CSV to excel would be more difficult. However, there should be some third party programs you can use to do that bundled up as a jar file. In fact I've used one successfully before.
Last edited by iamthwee; Dec 11th, 2006 at 2:52 pm.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Dec 11th, 2006
0

Re: how to read CSV file in java

or you can write your own, outputting SLK for example.
The format is well described and though messy offers flexibility.

Technically of course you wouldn't have to do anything as Excel can read and interpret CSV files directly
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 11th, 2006
0

Re: how to read CSV file in java

Click to Expand / Collapse  Quote originally posted by jwenting ...
Technically of course you wouldn't have to do anything as Excel can read and interpret CSV files directly
Oopsie. I didn't even think of that.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: I want to run my jsp page online on internet
Next Thread in Java Forum Timeline: Can I run an ASP file from a Java Applet Button?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC