google-spreadsheet-api

Unable to complete the HTTP request when using SpreadSheet API

强颜欢笑 提交于 2019-12-08 02:53:35
问题 I am developing a Google App Engine application which reads and edits a big SpreadSheet with around 150 columns and 500 rows. Beside the specific size (it may vary) I am looking for a way to improve performance since most of the times I get a 500 Internal Server Error (as you can see below). java.lang.RuntimeException: Unable to complete the HTTP request Caused by: java.net.SocketTimeoutException: Timeout while fetching URL: https://spreadsheets.google.com/feeds/worksheets

Delayed Execution on Edit with Google Apps Script

穿精又带淫゛_ 提交于 2019-12-07 23:23:37
问题 I have a relatively large spreadsheet (300 rows, 30 columns) that I color based on the values in the spreadsheet. I'm doing accessing the API minimally using only two accesses: getValues(...) to access all the values of the data range. setBackgrounds(...) to set all the backgrounds of the data range. This runs in about half a second or less. However, it gets in the way if I make it run on every edit using onEdit() , but I also don't want it to be updated at regular time intervals when I'm not

Gspread keep alive after update google auth2

醉酒当歌 提交于 2019-12-07 21:20:02
问题 There are several examples for 'keep the connection with google spreadsheet alive' But all I found are based on the 'old' Google Sign-In system which isn't work anymore since april 2015 What is the proper methode to keep the connection with googlespreadsheet alive using OAuth 2.0 I've Tried this import gspread from oauth2client.service_account import ServiceAccountCredentials headers = gspread.httpsession.HTTPSession(headers={'Connection':'Keep-Alive'}) #Allows a persistant connection. scope

Move a sheet to a particular position using Python & the Google Sheets API

风流意气都作罢 提交于 2019-12-07 19:31:46
问题 I am trying to use the Google sheet API via python. So far I have been successful in performing some tasks. My problem is for example I have 4 sheets in a particular worksheet in the order of [sheet1][sheet2][sheet3][sheet4]. What I want is to manipulate the positions of the sheets. For example, sheet 4 would now be located at the second position. So now, the positions of the sheets would become [sheet1][sheet4][sheet2][sheet3] Is there a way to do this in python? Thanks! 回答1: It should be

Fuzzy match on google sheets

老子叫甜甜 提交于 2019-12-07 17:38:34
问题 I'm trying to fuzzy match two columns in google sheets, i've tried numerous formulas but I think it's going to come down to a script to help out. I have a column with product ID's e.g. E20067 and then I have another sheet with another column which has image url's relating to this product code such as http://wholesale.test.com/product/E20067/web_images/E20067.jpg http://wholesale.test.com/product/E20067/high_res/E20067.jpg http://wholesale.test.com/product/E20067/high_res/E20067-2.jpg What I'm

How to share google spreadsheet without menu bar?

风格不统一 提交于 2019-12-07 17:31:19
问题 How to share google spreadsheet without menu bar (File Edit View Insert...)? Or how to hide main menu while sharing google spreadsheet.? 回答1: &rm=minimal works for me Source: https://productforums.google.com/forum/#!topic/docs/VXjZXqYfCu4 来源: https://stackoverflow.com/questions/27751830/how-to-share-google-spreadsheet-without-menu-bar

Setting setFormulas() will clear the existing data

孤街醉人 提交于 2019-12-07 14:37:38
问题 I want to keep the cell data as it is for those cells which have no formula applied. The code snippet explains the function. this solution too overwrites the values, setFormulas won't skip empty array elements, over-writes values var sheet = SpreadsheetApp.getActiveSheet(); var range = sheet.getDataRange(); var Formulas = range.getFormulas(); for (var i in Formulas) { for (var j in Formulas[i]) { if (Formulas[i][j] == "") //cells which dont have the formula { //dont apply any formula, but

How to get Taiwan Stock Exchange Index in google spreadsheet

血红的双手。 提交于 2019-12-07 12:59:48
问题 How to get Taiwan Stock Exchange Index in google spreadsheet? This index do exist in google finance under https://www.google.com/finance?q=TPE%3ATAIEX I tried the following formula, but all of them are failed. =GoogleFinance("TPE:TAIEX"; "price") =GoogleFinance("TPE.TAIEX"; "price") =GoogleFinance("TAIEX.TW"; "price") =GoogleFinance("TAIEX:TPE"; "price") =GoogleFinance("TAIEX.TPE"; "price") =GoogleFinance("TPE%3ATAIEX"; "price") 回答1: =GoogleFinance("TWII"; "price") 回答2: I can propose you 2

Access Google spreadsheet API without Oauth token

我与影子孤独终老i 提交于 2019-12-07 09:01:24
问题 I've read google spreadsheet documentation https://developers.google.com/sheets/api/guides/authorizing And it says, that if document is public, you don't need Oauth 2.0 and API key is sufficient. I'm trying to do a test request with hurl and api key as parameter.it, but it still gives me error, that I need to use Oauth, any thoughts? POST https://sheets.googleapis.com/v4/spreadsheets/16woR-nfy6KYBbkQpC2YOT1GzIean8rTzjueUnlzLMiE/values/Sheet1!A1:E1:append?valueInputOption=USER_ENTERED Response

Google Apps Script/Sheet Returns Bad Request 400

旧街凉风 提交于 2019-12-07 06:47:34
问题 I have a fairly simple script running on a Google Sheet. The script accepts a webhook POST and writes the content of the webhook as a new row in the spreadsheet. The script does function as expected and it writes a new row when it receives data. However, the app from where I'm sending the webhook receives back "Bad Request 400" error for some reason. Even though the script worked and it did what it was supposed to do. This is a fiddle of the script I'm using. If I call this manually, I do get