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.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
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 ;)
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
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.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439