Hello,

I created a spreadsheet before the API 3 upgrade and I was using a simple 
piece of code like this one : 

<code>
function currentrow() {
  var range = SpreadsheetApp.getActiveRange();
  var row = range.getRow();
  return row;
}
</code>

When applied the function in a cell with =currentrow(), that piece of code 
returned for each cell the row number, as expected.

I then created a new spreadsheet in API 3 and that code is not behaving the 
same and I can't understand why nor find a way to get the same information.

Here what I did with the new spreadsheet : 
- in cell A1, apply =currentrow()
- in cell A2, apply =currentrow(), 
- in cell A3, apply =currentrow()

As a result, A1 will return 1, as well as A2 and A3. In fact, all the cell 
in which I applied this function will return 1, even in other sheets.

But, if I delete the content of A1, then after some time A2 and A3 will 
display 2. And if I delete A2, then A3 will return 3.

Finally, if I re-apply the function in A1 and A2, then the value returned 
will be 3.

Can someone please explain why this is happening and how I can do to get a 
function that'll simply return the row number? I couldn't find it on my own.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to