SPUG: / Spreadsheet::WriteExcel / any experience? /

ced at carios2.ca.boeing.com ced at carios2.ca.boeing.com
Thu Aug 14 20:43:00 CDT 2003


> Before posting any possible problems, I thought
> I'd ask to see if anyone on this list has ever
> used Spreadsheet::WriteExcel (0.41) in a
> non-Windows environment?

Yes, details are fuzzy now but I used 
Spreadsheet::WriteExcel sometime last 
year on Solaris. Worked well for my 
simple app.  
--
Charles DeRykus

my $workbook = Spreadsheet::WriteExcel->new("EDS-$current_month.xls");
my $worksheet = $workbook->addworksheet();

$worksheet->write( 0, 1, 'Bellevue');
$worksheet->write( 0, 2, 'St. Louis');
$worksheet->write( 0, 3, 'Seal Beach');
$worksheet->write( 0, 4, 'Total');

my ( $row, $col, $region );
$row = 1;
my $monthly_total;

MONTH: foreach my $mon ( sort {$mon{$a} <=> $mon{$b}} keys %mon ) {
   $col = $monthly_total = 0;
   if ( $numeric_mon{ $mon } > $numeric_mon{ $current_month } ) {
      $worksheet->write( $row++, $col, "$mon-$current_year" );
      next MONTH;
   }
   $worksheet->write( $row, $col, "$mon-$current_year" );

   foreach $region ( qw/Bellevue St.Louis SealBeach/ ) {
       $worksheet->write( $row, ++$col, $totals{ $region }{ $mon } );
       $monthly_total += $totals{ $region }{ $mon };
   }
   $worksheet->write( $row++, $col, $totals{ $region }{ $mon} );
}
$workbook->close(); 
__END__



More information about the spug-list mailing list