in reply to Re: Help with Spreadsheet::ParseExcel
in thread Help with Spreadsheet::ParseExcel
#!/usr/bin/perl -w use strict; use CGI qw( -oldstyle_urls :standard ); use CGI::Carp qw ( fatalsToBrowser ); use Spreadsheet::ParseExcel; my $f_to_parse = "accounts.xls"; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse($f_to_parse); #my $workbook = Spreadsheet::ParseExcel::Workbook->Parse($f_to_parse)o +r die "Unable to open $f_to_parse\n"; if ( !defined $workbook ) { die "Got error code ", $parser->error_code, ".\n"; } for my $sheet (@{$workbook->{Worksheet}}) { print "Sheet: ", $sheet->{Name}, "\n"; } #Result: #Sheet: Sheet1 #Sheet: Sheet2 #Sheet: Sheet3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Help with Spreadsheet::ParseExcel
by toolic (Bishop) on Jan 11, 2011 at 19:49 UTC |