|
Reading ExcelSheet and Writing XML: msg#00002lang.perl.xml
Hello, unfortunately, I can't access the archive of mailings on http://mailarchive.activestate.com/browse/perl-xml/ to see whether my question was already answered somewhere else. I do have an Excel-file with several worksheets inside and would like to create a XML file out of it. I found a base solution to read out Excel files into a stream: =========================== use strict; use Spreadsheet::ParseExcel; my $oExcel = new Spreadsheet::ParseExcel; my $oBook = $oExcel->Parse("abc.xls"); my($iR, $iC, $oWkS, $oWkC); my $oWkS = $oBook->Worksheet("Worksheet3"); $iR = 1; for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) { $oWkC = $oWkS->{Cells}[$iR][$iC]; print "( $iR , $iC ) => ", $oWkC->Value, "\n" if($oWkC); } =========================== However, I would like to create a XML file out of this and manipulate some elements. In O'Reilly's "Perl&XML" by Erik T. Ray and Jason McIntosh <example 5-6> gives an example of how to read out an excel sheet and create a XML file. However, I cannot use a Excel file with several sheets with this module. Can anybody help me on that task? Thanks, Dominik
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: LibXSLT / XPathContext interaction, Elizabeth Mattijsen |
|---|---|
| Next by Date: | RE: Reading ExcelSheet and Writing XML, Frazier, Joe Jr |
| Previous by Thread: | Re: LibXSLT / XPathContext interaction, Petr Pajas |
| Next by Thread: | RE: Reading ExcelSheet and Writing XML, Frazier, Joe Jr |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |