use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new("perl.xls");$worksheet = $workbook->add_worksheet();$worksheet->write('A1', "Hi Excel!");
"
####
use Spreadsheet::WriteExcel;
use strict;
print "Spreadsheet::WriteExcel VERSION $Spreadsheet::WriteExcel::VERSION\n";
unlink("perl.xls");
my $workbook = Spreadsheet::WriteExcel->new("perl.xls") or
die "failed to create new workbook: $!";
my $worksheet = $workbook->add_worksheet() or
die "failed to create new worksheet: $!";
my $status;
eval {
$status = $worksheet->write('A1', "Hi Excel!") or die $!
};
print "write failed: $@ with status $status\n" if $@;
####
Spreadsheet::WriteExcel VERSION 2.10
write failed: No such file or directory at worksheet.pl line 11.
with status 0"