|
Antwort: RE: Reading ExcelSheet and Writing XML: msg#00004lang.perl.xml
I would be more than happy to buy one but it is not available in Europe (see www.amazon.de compared to www.amazon.com) and that's why I didn't know there is one book as this. I could buy one currently with EBay for about 80 (!!) US Dollars :-( Just wrote an email to amazon asking them whether they can send it anyway. Thanks for the hint to XML::SAXDriver::Excel. As stated in my first Email that's what I've found already. The module is great but I can't find a way to read only one worksheet of an Excel file. I would have tried it with reading a ByteStream instead of String as Source. But this is currently not supported. So how can I do that? Since I am not a good programmer I am not very familiar with object orientation in Perl and as such don't understand completely the module and the example given in the O'Reilly's "Perl and XML". Does your book go into more detail about that (not basics of Perl but more detailed information about the modules)? For instance, which methods can I define myself with which parameters? Thanks, Dominik Grupp
Maybe if you would've bought "XML and Perl" by Sams, than you would of found the solution:-) Just kidding and marketing at the same time:-) Use XML::SAXDriver::Excel module, and see the docs and/or the book for examples. I think the O'Reilly book has an example of that as well. Ilya Sterin > -----Original Message----- > From: Dominik.Grupp@xxxxxx [mailto:Dominik.Grupp@xxxxxx] > Sent: Monday, December 01, 2003 10:37 AM > To: perl-xml@xxxxxxxxxxxxxxxxxxxxxxxx > Subject: Reading ExcelSheet and Writing 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: Reading ExcelSheet and Writing XML, Frazier, Joe Jr |
|---|---|
| Next by Date: | templating question [long-ish], wren thornton |
| Previous by Thread: | Reading ExcelSheet and Writing XML, Dominik . Grupp |
| Next by Thread: | Re: Antwort: RE: Reading ExcelSheet and Writing XML, Morus Walter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |