Create multiple sheets in a CSV file

I use superCSV to write csv data in my code. His work is absolutely beautiful and very effective, but now my demand has changed. I need to write several sheets in one xls file, which takes a lot of time. So, is there any way in supercsv whereby I can write several sheet data in one csv file and send it to the client, so that when the client opens this csv file in MS-Excel, it can see several sheets, not me, generating an excel file with multiple sheets and sending it to the client.

thanks

+7
java csv supercsv web-development-server
source share
2 answers

CSV is a very simple format and does not have the concept of a "sheet". So no, this is not possible directly. The only thing I can offer is to send several csv files to the client, possibly as a .zip file, and the client will unify it and import one sheet at a time into Excel.

If you need to open it directly in a browser, you need to go with the xls file.

+18
source share

Take a look at the api here.

http://supercsv.sourceforge.net/apidocs/index.html

I am not familiar with SuperCsv, please do not beat me too badly if I am mistaken ... Can you just set CsvPreference to EXCEL

+1
source share

All Articles