Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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
Replies are listed 'Best First'.
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!');


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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2015-11-28 17:05 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls