Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
3

Add getValue() to var r = sheet.getRange("D11");. The resulting code line is: var r = sheet.getRange("D11").getValue(); The above because getRange returns Range object which not return directly it's value/values. Also replace r.hideRows(11); by sheet.hideRows(11); For further details checkout https://developers.google.com/apps-script/guides/sheets


1

ok, I learned that you need to apply htmlbody like var contentHTML = "<body> <font color='red'> <b>SUPERVISOR!</b> \n \n <p> <b> REVISA EL PLAN/FACT DE LA SEMANA</font></b> </p><br> <a href='" + urlsheet + "'>CLICK PARA SIGUIR A LOS REPORTES DEL TURNO</a> </p><br> </body&...


1

I used the script below, located in https://stackoverflow.com/q/56215898/7108653, like suggested for @Tanaike, and adjusted with just a few things (lines 3, 4 and 5). function downloadSheetAsPDF2() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheetId = ss.getSheetByName("RECEITA PARA IMPRESSÃO").getSheetId(); var valor = SpreadsheetApp....


1

I had a situation to randomly pick M or F in a column. I used this formula in Google Sheets: =IF(RANDBETWEEN(1,2) = 1,"M","F") Crude way, certainly not for long lists, but it works if your set of values is small.


1

I found some different partially workaround, it's not perfect but I think I could be helpful: instead of sending as a parameter I sent it as a string, for example, when choosing the range it will be =example(a1:a3) I used: example("a1:a3") when I first selected the range and then changed it manually.


1

Get the associated sheet (spreadsheet) and indicate which tab (sheet) you want to have focus: var theSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Robin"); // do the thing var theSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Lucy"); // do the other thing Reference: https://developers.google.com/apps-script/reference/...


Only top voted, non community-wiki answers of a minimum length are eligible