Your problem is that you're using single quotes, so "$row" doesn't get replaced with its value.
# -1 per Mr. Muskrat
$worksheet->write($row-1, 6, "=SUM(C$row:E$row)" );
I replaced "write_formula" with "write", since using that
method results in formulas that work for me (although looking at the docs, that wasn't the problem. See Mr. Muskrat's excellent answer).
Oh, and if this doesn't work, you're in luck. The author of SS:WE hangs out here, so he'll probably know exactly what you need.
--
Mike
Edit: D'oh! Mr. Muskrat's right; the row is 0 based in the write_formula call, but 1-based in the formula.
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.