Gentlemen,
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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.