Hi
I am very new to scripts, and don't really know how to code, but can copy and paste different script together, but not much more than that.
I have created a script that is suppose to export data to a Google sheet, to a specific sheet. I can make it work and export but only to the first sheet in my Google sheet, but when i add a line to export it to a specific sheet the script fail.
I have tried some different solutions but have not been able to make it work.
This is what the script looks like now, it always gives this error message:
ReferenceError: ss is not defined
at main (Code:9:14)So i know that is is line 9 where i try to specify what sheet i what it to export to. Have tried to set it under var SPREADSHEET_URL but it didn't work either. and i have also tried a different line that didn't work either
var sheet = spreadsheet.getSheetByName('Sheet1');
***Script starts here***
var SPREADSHEET_URL = 'SHEET-URL';
function main() {
var sheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL).getActiveSheet();
var sheet = ss.getSheetByName('Sheet2');
var range = sheet.getRangeList(['A1:A', 'B1:B'])
range.clearContents();
sheet.getRange("A1").setValue("Campaign");
sheet.getRange("B1").setValue("Ad groups");