Hi
One of the questions I'm asked a lot when I go to conferences to present
on OOo is, How do I do a batch conversion of my legacy files to OOo?

I was thus very pleased to come across this article [0] which has a
rather good answer:

"Most people know that you can use OpenOffice 2.0, the open source
alternative to Microsoft Office, to open up a Microsoft Office file and
then save it in OpenOffice's native format—a zipped file that includes
the document's contents as an XML file conforming to the OASIS
OpenDocument standard. This works for Word documents, Excel
spreadsheets, and PowerPoint presentations. (See the XML.com article
Opening Open Formats with XSLT for an example of the kind of simple new
application that this makes possible: a stylesheet that extracts the
slide titles and notes from a slideshow file and stores them in a single
file that you can use as speaker notes when giving a presentation.)
After opening one of these file types, you can even export them to an
Acrobat PDF file.

"Like a lot of single-file conversions, this involves opening up and
filling out various dialog boxes. If you have hundreds of files to
convert, this isn't very practical. What if you want to load XML
versions of a large collection of Word files, Excel spreadsheets, or
PowerPoint files into an XML-aware database where you can query the
collection? What if you're the State of Massachusetts or IBM?

Like its Microsoft counterpart, OpenOffice has a macro language. You can
start up OpenOffice from the Linux or Windows command-line prompt with
instructions to to run a particular macro, and you can even pass a
filename as a parameter to that macro. Adding the -invisible switch to
the command line tells OpenOffice to start up without the graphical user
interface (GUI). Put all these together, and you've got a command line
that converts a Microsoft Office file to an OpenOffice file (or an
Acrobat file) with no use of the GUI. To convert a hundred files, you
can use a Perl script or other scripting language to create a batch file
or shell script that has the hundred commands necessary to convert those
files."


The rest of the article shows the macro.

Cheers,

Louis

[0] http://www.xml.com/pub/a/2006/01/11/from-microsoft-to-openoffice.html


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

Reply via email to