google-docs-api

Row count off by one in google spreadsheet

自作多情 提交于 2019-11-28 10:35:22
问题 I want to delete empty rows. Row 885 is a non-empty row and should be retained. However, my code says (and shows in the msgbox) that 885 is empty and should be deleted. When it gets to i=884, it prints what is really in row 885 and says it will NOT be deleted. So, I'm confused. It appears to be acting upon the data properly, yet it's reporting the row number wrong. I suspect you're going to tell me offsets are zero based and rows start at 1, so if lastrow=888 (1 based), then I need to

inject external javascript file in google app script(Google Docs) [closed]

夙愿已清 提交于 2019-11-28 10:28:58
Please let me know how to inject external javascript file in google app script(Google Docs). Thanks in advance. Depending on what you mean by Inject, one possible answer is to use the standard javascript eval() function along with UrlFetchApp: eval(UrlFetchApp.fetch('http://path.to/external/javascript.js').getContentText()); If you want to include a JS file in the HTML output of a published script, simply include the javascript using tags in your HTML. <script src="http://path.to/external/javascript.js"></script> Eval docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference

Getting 401 Unauthorized from Google API Resumable Update

天涯浪子 提交于 2019-11-28 09:43:16
问题 I am trying to integrate upload of arbitrary files to Google Docs into an existing application. This used to work before using resumable upload became mandatory. I am using Java client libraries. The application is doing the upload in 2 steps: - get the resourceId of the file - upload the data To get the resourceId I am uploading a 0-size file (i.e. Content-Length=0). I am passing ?convert=false in the resumable URL (i.e. https://docs.google.com/feeds/upload/create-session/default/private

How to match comments on an image using kix anchor (or not) in Google Docs

依然范特西╮ 提交于 2019-11-28 09:33:45
It's possible to retrieve elements of an open Google Docs document, starting from DocumentApp.openById(doc_id, folder_id) but the comments on a document are retrieved through the Drive API, with Comments.list Running this on a document with 2 comments: one on an image, one on a word in a paragraph shows that while text-anchored comments do, images don't return a context entry: "content": "test comment on text", "deleted": false, "status": "open", "context": { "type": "text/html", "value": "some text the comment is placed on" }, "anchor": "kix.xxxxxxxxxxx1", "content": "test comment on an image

Download a Google Docs Spreadsheet as HTML

我是研究僧i 提交于 2019-11-28 09:20:10
问题 Im using the Google Drive api with php to do all sorts of wonderful things but getting stuck with downloading a Spreadsheet in HTML format. I can use the getExportLinks() method to download it in its various formats, but all i want is the text from the sheet and not a formatted file in docx or ods. This was possible with the google docs api by using the /feeds/download/spreadsheets/Export?exportFormat=html&format=html&key=ID url. But currently being redirected when I use it. Is it possible to

How to get a note or comment

ぐ巨炮叔叔 提交于 2019-11-28 09:16:33
问题 I have an Excel containing cell comments/notes, I've uploaded it to Google Drive, and converted it into a Google Spreadsheet. How may I retrieve the comments for cell A1? The API doesn't describe how to get a note or comment from a cell. 回答1: The Google Apps Spreadsheet API only provides programmatic access to spreadsheet data. You cannot access comments using the API. You can get the Notes for a cell or range of cells using Google Apps Script. See the Class Range documentation for these

Unexpected exception upon serializing continuation

旧城冷巷雨未停 提交于 2019-11-28 09:08:54
问题 I get this error: Unexpected exception upon serializing continuation (not much help) It is caused by the FetchUrlApp.fetch(); call. I akm using Google Apps Script for Sites, not Google Spreadsheets. The code works in the original instance but as soon as I copy and paste the code into a new project I get the above error message. I am accessing Google Docs APIs. I have read on other forums that I need authorization but I have been unable to gain the right authorization for the code to work. No

Why are requests to the Provisioning, Profiles, Reporting, Reporting Visualization, Admin Audit, Email Migration (v1), or Documents List API failing?

孤街醉人 提交于 2019-11-28 02:30:20
All of my calls to the following Google APIs have started failing: Provisioning Profiles Reporting Reporting Visualization Admin Audit Email Migration (v1) Documents List Has something changed? All the API listed were shut down as of April 20, 2015 as per the deprecation policies of the Admin SDK and Documents List API . Please see the following migration guides for more information on how to migrate: Provisioning API to Admin SDK Directory API Profiles API to Admin SDK Directory API Reporting API to Admin SDK Reports API Admin Audit API to Admin SDK Reports API Email Migration API (v1) to

Add an writer to a spreadsheet via “Google Document List API”

二次信任 提交于 2019-11-28 02:13:13
问题 I'm writting a script in Google Aps (GAS) and I need to add a user(/writer) (administrator of the domain) to a spreadsheed of a another user. The script is running/invoked under administrator privilegies. First I use "Google Apps administrative access to impersonate a user of the domain" and I get a list of his documents (spreadsheets) and I get the Id of the documents. var oauthConfig = UrlFetchApp.addOAuthService("docs"); oauthConfig.setAccessTokenUrl("https://www.google.com/accounts

writing to Google Drive spreadsheet

一个人想着一个人 提交于 2019-11-27 15:23:00
问题 I read tons about the Google Drive API, Google Sheets API, and others, but with all the versions changing all the time I didn't understand what I should use... I have a android app, and all I want to do it to write text to a existing Google Drive spreadsheet. Example: Just have a edittext where I can put text and put it in a specific cell in the spreadsheet. The spreadsheet is in a folder that is shared with some people, and I want the user to enter a mail address and than (after I make sure