[Tfug] Bulk OpenOffice Conversion
Andrew Halper
andrewhalper at cox.net
Thu May 24 09:35:46 MST 2007
> At 08:14 AM 5/24/2007 -0700, you wrote:
> >Do you need to manipulate the data in OO Calc? If not then perl is very good
> >at parsing ASCII files and outputting CSV which can then be imported in
> >Excel. For example I use rtrim() to parse an ASCII file that uses fixed
> >column widths. split() can be used to split a line on spaces, etc.
>
> Space-delimited files can be imported as easily (or, more to the point,
> with as much manual labor) as CSV files. I need a utility that will take
> any ASCII column-format text file and convert it into an OO Calc-format
> file, or even better (in this context) into an MS Excel-format file. I
> don't want to have to go into the OO GUI at all. The customer wants/needs
> Excel-format files, not files that must be imported and converted in some
> fashion. (I'd also like to be able to add some simple formatting
> information as well, but that's just window-dressing, pun intended).
There are several CPAN modules to write Excel files directly. Two are:
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.18/lib/Spreadsheet/WriteExcel.pm
http://search.cpan.org/~reneeb/Spreadsheet-SimpleExcel-1.5/lib/Spreadsheet/SimpleExcel.pm
Hope this is useful,
Andy
More information about the tfug
mailing list