Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

how i can convert a Excel file to a CSV(or text) file using java code

Help!!!!
ik need some java code: how i can convert a Excel file (spreadsheets) to
a CSV(or text file) file using java code.
is that possible?
thanks!!! dries.
[184 byte] By [dries] at [2007-11-9 21:19:10]
# 1 Re: how i can convert a Excel file to a CSV(or text) file using java code
Why would you want to go to all the trouble of using Java when you can just
do "Save As..." from Excel and change the file type to CSV?

PC2

dries <chdries@hotmail.com> wrote in message
news:3a82b7f2$1@news.dev-archive.com...
>
> Help!!!!
>
> ik need some java code: how i can convert a Excel file (spreadsheets) to
> a CSV(or text file) file using java code.
> is that possible?
>
> thanks!!! dries.
>
Paul Clapham at 2007-11-11 23:06:10 >
# 2 Re: how i can convert a Excel file to a CSV(or text) file using java code
If Java can be used to convert the data on an excel file to a plain text file, then it would be as simple as using a buffered reader to input the data from said text file into an application. Personally, this would help immensely with a program I am making that takes an excel file or a text file, extracts the data, allows the data to be manipulated, then outputs it to an excel or a text file. Of course, it is more complicated to deal with excel files, but much more imperative since the data involves tabs and it looks much better if the data is in an excel file than an ordinary text file. Thanks for any help.

:WAVE:
pMcGinty at 2007-11-11 23:07:10 >
# 3 Re: how i can convert a Excel file to a CSV(or text) file using java code
Why would you want to go to all the trouble of using Java when you can just
do "Save As..." from Excel and change the file type to CSV?

PC2

Maybe he's got 5000 excel files to convert...?
masher at 2007-11-11 23:08:14 >
# 4 Re: how i can convert a Excel file to a CSV(or text) file using java code
You can use JDBC to ODBC connection:

http://forum.java.sun.com/thread.jspa?threadID=181725

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=3&t=000342

http://www.javaworld.com/javaworld/javaqa/2001-06/04-qa-0629-excel.html
nspils at 2007-11-11 23:09:15 >
# 5 Re: how i can convert a Excel file to a CSV(or text) file using java code
Ya u can use jxl API to read the content from EXCEL sheet & and use File class of java to create text file with the retrieved content.....
webr at 2007-11-11 23:10:14 >