Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hi, i have problem in reading data

 
narasimharao konjeti
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i have one .csv file. i have to convert the csv file in .xls file, but should be in different cells. while iam reading and writing data to new file. It was come in to the single cell. how to put data into cells in .xls format.
cheers
nr konjeti
 
Amy Phillips
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you doing this through java? If you want to do it directly through excel you simply highlight the first column (A) and then select Data then Test to Columns, A window opens up and you select delimited data type and click next.
On the next screen indicate which divider you are using in your CSV. file and click finish. The data should be seperated into fields and you can save as an xsl file.
If you want to do this through java you will have to find a way of doing the above yourself
 
narasimharao konjeti
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am doing in java
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct me if I'm wrong, you can simply rename the file into data.xsl and M$ should picks up by extension and open up in Excell.
Also, you can use JDBC to do stuff like this.
Or use use Jakarta POI API, check out this tutorial by Oreilly:
POI
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic