Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Missing first row with formula

by erix (Parson)
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.

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2017-11-25 10:08 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (355 votes). Check out past polls.