how to read CSV file in java

Reply

Join Date: Dec 2006
Posts: 1
Reputation: josephmca77 is an unknown quantity at this point 
Solved Threads: 0
josephmca77 josephmca77 is offline Offline
Newbie Poster

how to read CSV file in java

 
0
  #1
Dec 11th, 2006
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 .
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: how to read CSV file in java

 
0
  #2
Dec 11th, 2006
Originally Posted by josephmca77 View 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 .
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.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: how to read CSV file in java

 
0
  #3
Dec 11th, 2006
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
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: how to read CSV file in java

 
0
  #4
Dec 11th, 2006
Originally Posted by jwenting View Post
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.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC