in reply to spreadsheet write excel border creation
I'm personally not terribly familiar with the module in question, but based upon the documentation, there doesn't appear to be range support for the write method. However, you could implement the functionality you desire using nested loops. You could use row-column notation like:
$format = $workbook->add_format(border => 1); for my $row (0 .. 2) { for my $column (0 .. 3) { $worksheet->write($row, $column,'undef',$format); } }
or using A1 notation:
$format = $workbook->add_format(border => 1); for my $row (1 .. 3) { for my $column ('A' .. 'D') { $worksheet->write($column.$row,'undef',$format); } }
Note that Perl is smart enough to deal with alphabetic indices in a limited fashion using Auto increment and Auto decrement and the Range Operators.
As a side note, if you wish to link to a module on CPAN on PerlMonks, use the notation [mod://spreadsheet::WriteExcel]. See more information in What shortcuts can I use for linking to other information?.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: spreadsheet write excel border creation
by skywalker (Beadle) on Mar 30, 2009 at 16:46 UTC |