Tom,

The HSSFRow defines a CellIterator this will allow you to iterate through
the row and get each element. You can then write the value of the cell out
to a new File, just create a comma delimeted string for the row.

Are you using Excel 97 or ExcelML formatted sheets?

Doug Stevens
(541) 788-3221



-----Original Message-----
From: tom corcoran [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2008 9:43 AM
To: [email protected]
Subject: Convert .xls to ascii?


I have about 10 different .xls file types. Each file has the column names in
row 1 and has multiple sheets with the same data for different locations. I
have hundreds of each file type. My solution need to be able to work
dynamically as new files come online.

I am looking at parsing the first line to create a mysql schema and then
importing the xls in java using mysql's load infile. I have used this to
load ascii files without an issue. It seems I can use
org.apache.poi.hssf.eventusermodel to read the xls files. Is there any way I
can use this package to convert to an ascii file which I will easily be able
to load into MySQl? The delimiter used, be it comma or otherwise is
irrelevant as load infile can cope with an ascii delimiter.

Thanks for advice.

Tom.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to