[kw-pm] Re: upcoming ora books

Daniel R. Allen da at coder.com
Mon Dec 9 09:16:26 CST 2002


#!/usr/bin/perl -w

use Spreadsheet::ParseExcel; # requires OLE::Storage_Lite

use strict;

my $filename = shift || "test.xls";

my $e = new Spreadsheet::ParseExcel;
my $eBook = $e->Parse($filename);

my $sheets = $eBook->{SheetCount};
my ($eSheet, $sheetName);

foreach my $sheet (0 .. $sheets - 1) {
        $eSheet = $eBook->{Worksheet}[$sheet];
        $sheetName = $eSheet->{Name};
        print "Worksheet $sheet: $sheetName\n";
        next unless (exists ($eSheet->{MaxRow}) and (exists ($eSheet->{MaxCol})));
        foreach my $row ($eSheet->{MinRow} .. $eSheet->{MaxRow}) {
                foreach my $column ($eSheet->{MinCol} .. $eSheet->{MaxCol}) {
                        next unless (defined $eSheet->{Cells}[$row][$column]);
                        print $eSheet->{Cells}[$row][$column]->Value. " | ";
                }
                print "\n";
        }
}


On Mon, 9 Dec 2002, Robert P. J. Day wrote:

> 
>   sorry, what got sent out was a content-free set of
> links.  from excel, i did a "save sheet as html",
> unaware that what it does was save a main page with
> links to a subdirectory of files.  
> 
>   once i figure this out, i'll try again.  i mean,
> how hard can it *be* to say, "please take this excel
> sheet and make it easily readable?"  grrrrrrr ...
> 
> rday
> 
> _______________________________________________
> kw-pm mailing list
> kw-pm at mail.pm.org
> http://mail.pm.org/mailman/listinfo/kw-pm
> 





More information about the kw-pm mailing list