google-spreadsheet-api

Google Spreadsheets API with OAuth2.0 using Javascript

我怕爱的太早我们不能终老 提交于 2019-12-31 09:05:21
问题 I'm trying to access a private Google Spreadsheet using Javascript. I have sucessfully authorized with OAuth2.0 and can see a listing of all my Google Drive docs. What I can't seem to do is get into a specific spreadsheet. Code is as follows with the relevant spreadsheet code in the function "retrieveAllFiles". A lot of this is culled from Google tutorials. var clientId = 'working'; var apiKey = 'working'; var scopes = 'https://www.googleapis.com/auth/drive.file https://www.googleapis.com

Google Spreadsheets API with OAuth2.0 using Javascript

落花浮王杯 提交于 2019-12-31 09:05:14
问题 I'm trying to access a private Google Spreadsheet using Javascript. I have sucessfully authorized with OAuth2.0 and can see a listing of all my Google Drive docs. What I can't seem to do is get into a specific spreadsheet. Code is as follows with the relevant spreadsheet code in the function "retrieveAllFiles". A lot of this is culled from Google tutorials. var clientId = 'working'; var apiKey = 'working'; var scopes = 'https://www.googleapis.com/auth/drive.file https://www.googleapis.com

Programmatically get a Spreadsheet “Publish[ed] on the web”

 ̄綄美尐妖づ 提交于 2019-12-31 01:54:22
问题 For the time being I believe this is a real wall I'm hitting my head on, but let's try: Is there any way to programmatically set a spreadsheet to "Publish[ed] on the web" via GAS, or using any of the Google APIs (Google Spreadsheets, Google Docs List, etc.) and UrlFetch? The goal is to access the sheet feed anonymously. Please note that it is possible to make a sheet "public" (through the Google Docs List: it's a "sharing" option), or using GAS setAnonymousAccess() I think, but as far as I

Google Spreadsheets script to delete any rows where a string is found

旧街凉风 提交于 2019-12-30 14:43:24
问题 I need to loop through all rows/columns in a sheet and remove rows contain certain words. Ideally, I would search through the sheet using a regular expression, but just finding a string would help get me moving. I'm seeing a lot of posts on Stack Overflow about finding and deleting empty rows, but can't find anything about searching an entire sheet and deleting a row if found. This is what I have so far: /* Delete rows */ function deleteRows() { var sheet = SpreadsheetApp.getActiveSpreadsheet

Google Spreadsheets script to delete any rows where a string is found

拥有回忆 提交于 2019-12-30 14:41:51
问题 I need to loop through all rows/columns in a sheet and remove rows contain certain words. Ideally, I would search through the sheet using a regular expression, but just finding a string would help get me moving. I'm seeing a lot of posts on Stack Overflow about finding and deleting empty rows, but can't find anything about searching an entire sheet and deleting a row if found. This is what I have so far: /* Delete rows */ function deleteRows() { var sheet = SpreadsheetApp.getActiveSpreadsheet

Do you need to migrate to Drive API when using https://spreadsheets.google.com/feeds/

喜欢而已 提交于 2019-12-30 06:42:27
问题 The 22nd of January, I received an email with the subject 'Important: Steps to migrate from discontinued Documents List API' from Google Apps . Important: Steps to migrate from discontinued Documents List API Hello administrators, We recently communicated that Documents List API will be discontinued on April 20, 2015. This change means that service calls for this API will no longer be supported, and any Google Apps features that are implemented using this API will no longer function. Our

How do I update my google sheet in v4?

不羁的心 提交于 2019-12-28 07:17:09
问题 I am new in google sheets v4 and I just want to know how can I update my google sheet in v4. I am using Nodejs and following is the code sample link which I am using Method: spreadsheets.values.update 回答1: You can use the sample script of the link. In you case, combining Quickstart and the sample script may be useful for you. The sample script is as follows. In this sample script, the text of sample text is imported to the cell a1 of Sheet1 . Sample script : var fs = require('fs'); var

Issue with OAuth2 authentication with google spreadsheet

…衆ロ難τιáo~ 提交于 2019-12-28 06:50:08
问题 I am using java library for oauth2 authentication for accessing google spreadsheet. I am using below code for OAuth2 authentication: credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(SERVICE_ACCOUNT_EMAIL) .setTokenServerEncodedUrl("https://accounts.google.com/o/oauth2/token") .setServiceAccountScopes("https://www.googleapis.com/auth/drive", "https://spreadsheets.google.com/feeds", "https://docs.google.com/feeds")

How to convert Google spreadsheet's worksheet string id to integer index (GID)?

点点圈 提交于 2019-12-28 03:39:06
问题 To export google spreadsheet's single worksheet to CSV, integer worksheet index(GID) is required to be passed. https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=%s&gid=%d&exportFormat=csv But, where are those informations? With gdata.spreadsheets.client, I could find some string id for worksheet like "oc6, ocv, odf". client = gdata.spreadsheets.client.SpreadsheetsClient() feed = client.GetWorksheets(spreadsheet, auth_token=auth_token) And it returns below atom XML. (part

Pushing data to Google spreadsheet through JavaScript running in browser

ε祈祈猫儿з 提交于 2019-12-28 03:23:06
问题 I am working on an web application where I would like to allow the user to push data to her own Google spreadsheet. Firstly I tried to use Google APIs Client Library for JavaScript but it doesn't seem to cover the Spreadsheet API (https://developers.google.com/apis-explorer/#p/). Then I decided to use directly the Google Spreadsheets API version 3.0. I manage to retrieve the user's spreadsheets using jQuery and JSONP : $.ajax({ url: 'https://spreadsheets.google.com/feeds/spreadsheets/private