> Guys,
>
> This has me well and truly confused. I have even copied and pasted the
lines
> from the documentation, and it still won't work!
>
> Can anyone tell me what I'm doing wrong here?
>
> use strict;
> use warnings;
> use Spreadsheet::WriteExcel;
> my $workbook = Spreadsheet::WriteExcel->new("cheese.xls");
> my $worksheet = $workbook ->addworksheet("Cheese page");
> my $format = $workbook->add_format();
> $format->set_properties(bold => 1, color => 'red');
> $worksheet->write_row (0, 0, ['This', 'is', 'cheese'], $format);
>
> I get the following error:
>
> Can't locate object method "add_format" via package
> "Spreadsheet::WriteExcel" (perhaps you forgot to load
> "Spreadsheet::WriteExcel"?) at D:\My Scripts\Learning\Excel\write.pl line
6.
>
> I've tried every way mentioned in the docs, but I get the same error.
>
> Thanks.
>
> R.


Works for me ( Activeperl 5.8.0.806, Spreadsheet-WriteExcel 0.42 ).  I
might try re-installing the module, and it wouldn't hurt to check that the
addworksheet() call is really returning a worksheet object before calling
add_format().

Steve

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to