[Tfug] Bulk OpenOffice Conversion

Paul Scott waterhorse at ultrasw.com
Thu May 24 08:59:59 MST 2007


Paul Scott wrote:
> Jim Secan wrote:
>   
>> I need to convert a large number of ASCII data files (column format, space
>> delimited) to OO Calc format, and from there to Excel format (customer is
>> tied to MS products).  Far too many to use the GUI approach.  After some
>> fruitless googling, I thought I'd ask if anyone has used, or know of, shell
>> or python tools that can do this conversion from the command line.
>>   
>>     
> 1, Most spreadsheet programs read .csv (comma separated value) files. I
> just opened two csv files with one File/Open with OOCalc.  Obviously a
> series in a directory could be selected with shift-click.  And this
> could probably be done directly with Excel.
>
> 2. MS Office programs can all be invoked with the .net version of a
> fairly simple VB program.  This used to be called OLE automation.
>   
3.  OpenOffice files are all zipped XML.  MS Office is also some version
of XML - check out XPS.  Once you do one file you know exactly what the
format for your particular spreedsheet is and could write a script to
generate this.  Maybe the Java guys who know about the XML variants and
tools can help here.

Paul





More information about the tfug mailing list