John,

Wow - I'm more than a bit impressed to hear from the module author. Thanks for taking the time.

I've tested your suggestion, and thought you might find some feedback useful:

I'm designing for Excel 2000. In Excel 2000, the code you suggest results in the token being right aligned, but in the first cell, even though the specified cells appear merged.

Similarly, changing the alignment to 'center' produces the token centred in the first cell.

This therefore solves left-aligning, since specifying align => 'left' left-aligns the token in the first cell.

To right align, your suggested code does disengage the Excel 95 'center' default, but I've had to add explicitly writing the token to the last cell with align => 'right', which right aligns the token in the last cell.

And to centre-align, I use the merge_cells + set_merge combination of the original post.

I hope this is useful for your next revision.

Thanks, though, for an overall fab module.


In reply to Re: Re: set_align() of merged cells in Spreadsheet::WriteExcel by Anonymous Monk
in thread set_align() of merged cells in Spreadsheet::WriteExcel by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.