Click here to get back home

Parsing OpenOffice Spreadsheets

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Parsing OpenOffice Spreadsheets Christoph Terhechte 04-25-2005
Posted by Christoph Terhechte on April 25, 2005, 7:23 pm
Please log in for more thread options


Hi all,

I've written a utility that reads OpenOffice Spreadsheet data into a Perl
structure, actually a hash (the keys correspond to worksheet names) of
arrays of arrays (the latter correspond to rows and cells, respectively.

It's a simple program that currently relies on XML::Parser::Lite::Tree for
parsing the XML content of sxc files.

The reason I'm asking for advice is that I'm unsure whether it's too close
to the existing OpenOffice::Parse::SXC module which is based on
XML::Parser. The main differences of the module I have in mind: a) It
returns the different worksheets as hash elements. In
OpenOffice::Parse::SXC you have to write a handler to achieve this. b) It
returns undef for empty cells, where OpenOffice::Parse::SXC returns an
empty string. Undef is better suited for importing data into a database
(which is what I've written the code for). c) It honors the
"number-rows-repeated" argument of SXC files, which is ignored by
OpenOffice::Parse::SXC. d) It optionally returns data any of several
encodings. On the other hand, my code is much less sophisticated and
doesn't allow flexible use of the module through handlers, as
OpenOffice::Parse::SXC does.

I haven't yet uploaded anything to CPAN, and although I really needed
something different than the existing modules, I'm unsure whether it's
wise to add yet another one. Regarding the namespace, I tend away from
OpenOffice::Foo, as my code is less about OpenOffice than it is about
importing spreadsheet data, so I am thinking of Spreadsheet::ParseSXC.

Please let me know what you think.

--
Christoph Terhechte


Similar ThreadsPosted
OpenOffice::OODoc 1.2 August 5, 2004, 1:54 pm
ANNOUNCE: OpenOffice-OODoc for Open Document format August 15, 2005, 9:39 pm
Google Spreadsheets November 7, 2006, 8:31 am
How to write into existing Excel Spreadsheets? July 13, 2004, 1:24 pm
Reading AND writing Excel spreadsheets April 30, 2005, 10:05 am
Help:Generating multiple spreadsheets in MSExcel worksheet using perl?? October 17, 2006, 11:37 am
XML::DOM parsing pb March 9, 2006, 1:27 pm
XML Parsing too slow November 19, 2005, 7:29 am
HTML parsing March 21, 2005, 3:24 pm
CGI.pm parsing odity May 16, 2006, 10:01 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap