On Fri, 2006-30-06 at 17:07 +0100, Gary Stainburn wrote: > Hi folks > > I'm just about to look into writing a perl prog to read in an excel > spreadsheet and us that to populate a SQL database. > > The idea is to save the spreadsheet as a .xml file (using Office XP), use a > perl module to read in the file, and using the parsed data update the > database. > > Would anyone like to pass on any experiences / recommendations before I dive > headlong in.
I normally use XML::Parser for XML but others prefer XML::SAX or XML::DOM. All are available in CPAN. XML::SAX and XML::DOM both use XML::Parser, which in turn uses the Expat library. This library is written in C and you may have problems compiling it. If you're using ActivePerl, all three are downloadable using ppm (the Expat library is downloaded automatically with any of the three). You may also want to consider exporting your data as a CSV or DSV file. There are modules in CPAN that can read these formats and other modules that can read an Excel file directly. -- __END__ Just my 0.00000002 million dollars worth, --- Shawn "For the things we have to learn before we can do them, we learn by doing them." Aristotle * Perl tutorials at http://perlmonks.org/?node=Tutorials * A searchable perldoc is at http://perldoc.perl.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>