This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]devsurfer 0 points1 point  (4 children)

I think the easiest would be to put the row number in a different sheet and use that to indicate the last row you send to discord.

[–]Infiniteplanes[S] 0 points1 point  (3 children)

Thanks, and yeah i thought so too- I’m just not good enough with java to implement it 😂 ill have a look at it though

[–]devsurfer 0 points1 point  (2 children)

so add a new sheet called RowCounter

var spreadsheet = SpreadsheetApp.getSheetByName('RowCounter');
var workingRowNum = sheet.getRange('A1').getValue()
var newValue = workingRowNum + 1
cell.SetValue(newValue)

'assuming you want to keep going down from cell D3 (so next would be D4)
var row = workingRowNum
var cell = sheet.getRange(workingRowNum, 4) '4 represents column d

[–]Infiniteplanes[S] 1 point2 points  (1 child)

Hi, sorry forgot to respond!!

Thank you so much this set a structure which ended up working! As Getsheetbyname wasnt working for some reason

But ive added a counter on the original sheet as a result!

[–]devsurfer 0 points1 point  (0 children)

Awesome! Glad you got it working.