wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Create .csv from .xls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Create .csv from .xls" Watch "Create .csv from .xls" New topic
Author

Create .csv from .xls

Amber Vaidya
Ranch Hand

Joined: Oct 14, 2003
Posts: 42
We have a requirement to create a .xls and a .csv file from some data.

I was successfully able to create the .xls using Apache POI and download the file on the client side using



Now, to generate the .csv file I changed the above to



The .csv file is created correctly and it opens in MS Excel.

The problem is if I open this .csv file in a text editor, it shows junk.

Can someone please tell me what am I doing wrong ? Something in POI or maybe something while setting the header ?

Don't even know if this is the right forum for this problem

Any help in this regard will be greatly appreciated.
Thanks
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
POI seems like overkill for csv files, since they ARE just text.
Amber Vaidya
Ranch Hand

Joined: Oct 14, 2003
Posts: 42
Yeah, I thought as much .. but since I am already creating the .xls file (which I need) using POI , I got lazy and decided to check if I can somehow turn the .xls to .csv

Magic ??
Amber Vaidya
Ranch Hand

Joined: Oct 14, 2003
Posts: 42
Finally did it by writing some more code to create a new csv file. :roll:

Deadlines !!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create .csv from .xls
 
Similar Threads
Problem in Export to Excel using Jexcel api
creating a text file from JSP
Jsp to Excel
JSP-EXCEL save defualt in .xls extension, open excel with in the browser
Download it in different sheets in Excel