Tom Anderson, Design Automation Scientist, Agilent Technologies
Date: Friday, August 5th, 2005
Time: 11:35am - 12:20pm
Location: Portland 255
This presentation explains how to write Perl programs that parse and generate OpenOffice documents.
OpenOffice is an open source suite of programs that can be used as a replacement for Microsoft Word, Excel, and Powerpoint. While OpenOffice can read and write Microsoft-compatible doc, xls, and ppt files, its native format is XML. Perl programs can take advantage of this XML format to directly read and write OpenOffice files.
Anderson explains the basic organization and structure of OpenOffice XML. OpenOffice files are a zipped collection of XML files. Unzipping the file reveals its XML content. A Perl module handles this task and keeps the content organized.
This presentation compares several Perl modules that are specifically designed to operate directly on OpenOffice files. These modules are available from CPAN and SourceForge. They can parse, generate, and modify OpenOffice documents.
General purpose Perl XML modules can also read and write OpenOffice files. This presentation demonstrates these Perl XML modules in example applications.
An example application is a web service that generates PNG web banners. This example uses the OpenOffice Draw application. It automatically creates bitmap banners for the web. These banners include attractive fonts and images.
Another example program is a spelling and style checker for OpenOffice. The program evaluates the readability and spelling of an OpenOffice document.