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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|