skip to Main Content

Javascript – Is there a way I can apply a function to one specific sheet?

Is there any way to apply this function to a sheet named "Production Log"? function CopyDatatoLog() { var spreadsheet = SpreadsheetApp.getActive().getSheetByName('Production Log'); spreadsheet.getRange('B8:B11').activate(); spreadsheet.getActiveSheet().insertRowsBefore(spreadsheet.getActiveRange().getRow(), 4); spreadsheet.getActiveRange().offset(0, 0, 4, spreadsheet.getActiveRange().getNumColumns()).activate(); spreadsheet.getRange('A8:BL11').activate(); spreadsheet.getRange('4:7').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false); }; I keep getting this error "TypeError:…

VIEW QUESTION

Google script json parse issue

I used this code to parse my webrequest response: for (var [key,val] of Object.entries(jsonObj)) { console.log("Key="+key); console.log("Value="+val); } Its working for one of my url but for another one I get: {members=[Ljava.lang.Object;@3e0dc74, list_id=xxxxx, total_items=2.0, _links=[Ljava.lang.Object;@610c2a56} The response is ok but…

VIEW QUESTION
Back To Top
Search