in reply to Couple of questions about Spreadsheet::WriteExcel

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.

Replies are listed 'Best First'.
Re: Re: Couple of questions about Spreadsheet::WriteExcel
by vxp (Pilgrim) on Aug 20, 2002 at 18:35 UTC
    Thanks! Now I'm using
    $worksheet->write($row, 6, "=SUM(C$row:E$row)" );
    however, it still produces a zero. even though like I said, the values in C$row through E$row _are_ there to be added!
      Sorry, I've never run into anything like that, unless I was putting the formula to the left of the cells it references, and even then, it got updated when I hit F9 in Excel...

      If you look at the contents of the cell in Excel, is it really 0, or is the formula there?
      --
      Mike