Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My first post to this forum.
Using Spreadsheet::WriteExcel. I'm finding that set_align() has no effect when applied to cells that have been merged, either by the merge_cells() method or the set_merge() method. The token always comes out centred.
Here is example code meant to merge all the columns of the fist row up to $last_col, and then right align $page_number:
my $format_page_num = $workbook->addformat(); $format_page_num->set_size(10); $format_page_num->set_font('courier'); $format_page_num->set_align('right'); $format_page_num->set_merge(); #merge cells and write page_num $worksheet->merge_cells(0, 0, 0, $last_column); $worksheet->write(0, 0, $page_number, $format_page_num); for $c (1 .. $last_column) { $worksheet->write_blank(0, $c, $format_page_num); }
Am I doing something wrong, or is this a well-known feature of Spreadsheet::WriteExcel? (Otherwise, a super duper rockin' module.)
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: set_align() of merged cells in Spreadsheet::WriteExcel
by jmcnamara (Monsignor) on Feb 10, 2002 at 22:38 UTC | |
by Anonymous Monk on Feb 11, 2002 at 00:48 UTC | |
|
Re: set_align() of merged cells in Spreadsheet::WriteExcel
by ignatz (Vicar) on Feb 11, 2002 at 17:20 UTC | |
by Anonymous Monk on Feb 11, 2002 at 20:18 UTC | |
by particle (Vicar) on Feb 12, 2002 at 00:54 UTC | |
by Kozz (Friar) on Feb 12, 2002 at 00:43 UTC |