Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Missing first row with formula

by erix (Vicar)
on Jan 09, 2014 at 22:57 UTC ( #1070032=note: print w/ replies, xml ) Need Help??


in reply to Missing first row with formula

for my $line (0..$row_count) { #this arguments are row, column, formula, format, first cell, sec +ond cell $xWS5->repeat_formula($line, 6, [...]

I didn't try the code, but I think this 0-based $line should be made 1-based, no? WriteExcel rows are 1-based.

UPDATE: ah, I stand corrected. WriteExcel rows are indeed 0-based. I did not carefully enough parse '1-based' from the this bit of documentation:

Row-column notation uses a zero based index for both row and column while A1 notation uses the standard Excel alphanumeric sequence of column letter and 1-based row.


Comment on Re: Missing first row with formula
Download Code
Re^2: Missing first row with formula
by Kenosis (Priest) on Jan 10, 2014 at 07:29 UTC

    It's zero-based. From the documentation:

    $worksheet->write(0, 0, 'Hi Excel!');

    and

    for my $row ( 0 .. 99 ) { $worksheet->repeat_formula( $row, 1, $formula, $format, 'A1', 'A' +. ( $row + 1 ) ); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1070032]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-12-19 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (72 votes), past polls