How do I rename a (work)sheet in a Google Sheets spreadsheet using the API in Python?

This is an extraction of a library which I’ve coded personally: def _batch(self, requests): body = { ‘requests’: requests } return self._service.spreadsheets().batchUpdate(spreadsheetId=self.spreadsheetId, body=body).execute() def renameSheet(self, sheetId, newName): return self._batch({ “updateSheetProperties”: { “properties”: { “sheetId”: sheetId, “title”: newName, }, “fields”: “title”, } }) I think that with a little effort, you can implement it into your … Read more

Google spreadsheet direct download link for only ONE sheet as excel

You can download a specific sheet using the ‘GID’. Each sheet has a GID, you can find GID of specific sheet in the URL of spreadsheet. Then you can use this link to download specific sheet – https://docs.google.com/spreadsheets/d/<KEY>/export?format=xlsx&gid=<GID> ex: https://docs.google.com/spreadsheets/d/1D5vzPaOJOx402RAEF41235qQTOs28_M51ee5glzPzj0/export?format=xlsx&gid=1990092150 KEY is the unique ID of the spreadsheet. source: https://www.quora.com/How-do-I-download-just-one-sheet-from-google-spreadsheet/answer/Ranjith-Kumar-339?srid=2YCg

In Google sheets, how does one either return a blank cell or perform a function based on another cells lack of content?

If you want to end up with a truly ‘blank’ value, you can use the expression IFERROR(0/0). This is different from an empty string which is what you get when you use “”. A cell with an empty string will not test true using ISBLANK(), but IFERROR(0/0) will. For example: =IF(ISBLANK(A1),IFERROR(0/0),”not blank”) How this works: … Read more

Changing background color of specific cell on Google sheet

You can use setBackground property with getRange. Try the below snippet. function myColorFunction() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var range = ss.getSheetByName(“Form Responses 1”).getRange(2,6,ss.getLastRow()); var cellRange = range.getValues(); for(i = 0; i<cellRange.length-1; i++){ if(cellRange[i][0] == “Open”) { ss.getSheetByName(“Form Responses 1”).getRange(i+2,6).setBackground(“red”); ss.getSheetByName(“Form Responses 1”).getRange(i+2,6).setFontColor(‘white’); } } }

How to use GOOGLEFINANCE((“CURRENCY:EURAUD”)) function

The specific instructions for what you are looking for are in here: https://support.google.com/docs/answer/3093281 Remember your Google Spreadsheets Formulas might use semicolon (;) instead of comma (,) depending on Regional Settings. Once made the replacement on some examples would look like this: =GoogleFinance(“CURRENCY:USDEUR”) =INDEX(GoogleFinance(“USDEUR”,”price”,today()-30,TODAY()),2,2) =SPARKLINE(GoogleFinance(“USDEUR”,”price”,today()-30,today())) Those 3 cells would result in something like this (the second … Read more