I currently use this code which I think takes longer the more the sheet grows:
def findLastRow():
global spreadsheet
global datastartrow
print 'rows: ', worksheet.row_count
lastrow = datastartrow
while(True):
val = worksheet.cell(lastrow, datastartrow).value
if val == '':
lastrow -= 1
break
lastrow += 1
return lastrow
Is there a more efficient way like getLastRow from GAS?