You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
Hi... I'm a beginner.
My AppsScript..... (sheet is from Google Form Response)
/** @OnlyCurrentDoc */
function sortResponses() {
var sheet = SpreadsheetApp.getActive().getSheetByName("RIR1(Responses)");
sheet.sort(2, false);
sheet.sort(5, false);
}
Having run it, I've got
Error
TypeError: Cannot read properties of null (reading 'sort')
sortResponses
@ Code.gs:4
I'd be glad if anyone can help..... Thank you.
Mateusz Krajewski
unread,
Dec 27, 2022, 10:17:11 AM12/27/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
Hi there,
I think that maybe you should define the range of cells/values you wanna sort and then sort that range. Currently you only specified the sheet your script should work on. I can see that you also specify the column number you wanna use in your sort(). Try with getRange() for example.