Greetings all, I've been palying around with Spreadsheet::WriteExcel lately (excelent module, by the way; no pun intended), and I think that I've discovered a bug of sorts. Here's a program that demonstrates the problem:
#!/usr/local/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new("test.xls"); my $worksheet = $workbook->addworksheet("foo"); my $formula = $worksheet->store_formula('=SUBTOTAL(9,A1:B1)'); foreach my $row (0..99) { $worksheet->write($row, 0 , $row+1); $worksheet->write($row, 1 , $row+1); $worksheet->repeat_formula($row, 2, $formula, undef, 'A1', 'A' +.($row+1), 'B1', 'A'.($row+2)); $worksheet->repeat_formula($row, 3, $formula, undef, 'A1', 'B' +.($row+1), 'B1', 'B'.($row+2)); #$worksheet->repeat_formula($row, 2, $formula, undef, 'A1', 'A +'.($row +1), 'B1', 'B'.($row+1)); #$worksheet->repeat_formula($row, 5, $formula, undef, 'A1', 'D +'.($row +1), 'B1', 'E'.($row+1)); }
In the resulting spreadsheet, column "C" shows up as expected, and for the most part, so does column "D", except for rows 10-19, and row 100. For those rows, the formula that is put in the cell is of the form =SUBTOTAL(9,B1: B(11*row)), where row is the row in the Excel file. Is this something that's documented that I missed, or is this a genuine bug?

thor


In reply to Bug in Spreadsheet::WriteExcel? by thor

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.