What is the fastest way to update a google spreadsheet with a lot of data through the spreadsheet api?

I was able to speed up the batch request provided in the official API http://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html#SendingBatchRequests by skipping the QUERY part before the UPDATE. So this is what they have in the example: // Prepare the update // getCellEntryMap is what makes the update fast. Map cellEntries = getCellEntryMap(ssSvc, cellFeedUrl, cellAddrs); CellFeed batchRequest = new CellFeed(); … Read more

How to Print sheet/range using .gs script in Google Sheets?

You can use the following script: var PRINT_OPTIONS = { ‘size’: 7, // paper size. 0=letter, 1=tabloid, 2=Legal, 3=statement, 4=executive, 5=folio, 6=A3, 7=A4, 8=A5, 9=B4, 10=B ‘fzr’: false, // repeat row headers ‘portrait’: true, // false=landscape ‘fitw’: true, // fit window or actual size ‘gridlines’: false, // show gridlines ‘printtitle’: false, ‘sheetnames’: false, ‘pagenum’: ‘UNDEFINED’, … Read more

gspread authentication throwing insufficient permission

Try to change your scope variable to the following: scope = [‘https://spreadsheets.google.com/feeds’, ‘https://www.googleapis.com/auth/drive’] Make sure Drive API is enabled in API console. gspread has been upgraded and it’s now based on API v4. It’s faster but it requires updates in scope. Here’s the same issue: https://github.com/burnash/gspread/issues/512

Pushing data to Google spreadsheet through JavaScript running in browser

Step-by-step instructions with screenshots After reading Martin Hawskey‘s good introduction (to sending data from an HTML form to a Google Spreadsheet) and seeing a few gaps/assumptions, we decided to write a detailed/comprehensive tutorial with step-by-step instructions which a few people have found useful: https://github.com/dwyl/html-form-send-email-via-google-script-without-server The script saves any data sent via HTTP POST in the … Read more

Download a spreadsheet from Google Drive / Workspace using Python

The https://github.com/burnash/gspread library is a newer, simpler way to interact with Google Spreadsheets, rather than the old answers to this that suggest the gdata library which is not only too low-level, but is also overly-complicated. You will also need to create and download (in JSON format) a Service Account key: https://console.developers.google.com/apis/credentials/serviceaccountkey Here’s an example of … Read more