Need help to convert CSV to Excel suing java or pl/sql

Hi,

I want to convert the CSV file Excel sheet using java code with out using POI.
Please help asap.
Thanks,
Rama
ramadevimandalaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gurvinder Pal SinghCommented:
0
shru_0409Commented:
0
ramadevimandalaAuthor Commented:
This will convert excel to CSV right? I want to convert CSV to excel.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Gurvinder Pal SinghCommented:
did you tried the link that i posted?
0
ramadevimandalaAuthor Commented:
Thank you for your help.Ya I have tried but I am notable apply for my code, I am generating the CSV and placing that on the server so I need to read that and create the excel on the server and I dont have any web.xml  I am using OAF with JSP .
0
Gurvinder Pal SinghCommented:
<<Ya I have tried but I am notable apply for my code>>
<<I dont have any web.xml >>
Could you please expand on this?

You need web.xml if you want to make any web-application...let alone the JSP.  :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mrcoffee365Commented:
Converting CSV to Excel means producing a binary file in the MS Excel format.

We use JExcel, which works fine, but other Java packages are available to produce Excel files.
http://jexcelapi.sourceforge.net/

If your data is in a .csv file, then you will have to read in that data to your Java program, then write out a .xls file.

At that point, you can change your response header to the .xls file name.
0
ramadevimandalaAuthor Commented:
I dont want read the CSV file line by line as it is slow process for big file, is there any way i can do save as excel kind of thing?
0
Gurvinder Pal SinghCommented:
@ramadevimandala: You haven't responded to my reply #26283847.
0
ramadevimandalaAuthor Commented:
Yes I am using just jsp code as explained in previous comment I cant use the code which reads line by line csv and loads to excel sheet.
0
Gurvinder Pal SinghCommented:
If Apache POI is out of question, then can you use JExcel?
http://www.rgagnon.com/javadetails/java-0516.html

0
mrcoffee365Commented:
>I dont want read the CSV file line by line as it is slow process for big file, is there any way i can do save as excel kind of thing?

Are you saying that you currently create a CSV file from your data, and you'd prefer to save it as a .xls file?  In that case, you can use the calls from the JExcel api (as I mentioned in a previous comment above) to save the file as a .xls file from the beginning.

There's no 1-line Java call which matches "save as Excel".  MS Excel does a lot under the covers when you do that.  It is possible to build a COM object for calling MS Excel from a Java program, but it's very difficult to get that to work.  Plus, it will still be slow when you do it for a big file.  The Java JExcel calls will be faster.
0
ramadevimandalaAuthor Commented:
Ok Thank you for help.
I have clicked on the link http://jexcelapi.sourceforge.net/ it opens the links and api, could you give any sample code which do the save as xls?
0
mrcoffee365Commented:
If you click on the FAQ link:
http://jexcelapi.sourceforge.net/resources/faq/
you'll see example code.

Try it and see how it works.  If you have problems, post your code here with the exceptions you're getting.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.