google-docs-api

Function for word count in Google Docs Apps Script

不羁岁月 提交于 2019-12-12 17:05:59
问题 Is there a method in Google Apps Scrips that returns the word count from a Google Document? Lets say I'm writing a report that have a particular limit on word count. It's quite precise and it states exactly 1.8k - 2k words (yes and it's not just a single case, but many...) In Microsoft Office Word there was a handy status bar at the bottom of the page which automatically updated the word count for me, so I tried to make one using Google Apps Scrips. Writing a function that rips out whole text

Ovewrite table Google Script interactive Google Sheet to Google Docs and vice-versa

雨燕双飞 提交于 2019-12-12 09:27:57
问题 This is my final project in view mode : https://drive.google.com/open?id=1gOOb3hND3q2v0vTy8SfPVHFiCnTkJPR5 each row corresponds to a Google Doc project so when I modify in the row it will modify the corresponding Doc and when I click to see the document in the same window when I modify if then click the submit button I will change the row so I have an interactivity 100% with only the trigger onEdit(e) which will call function Edit(e) and openDialog(e). The problem is that it can overwrite the

Google Drive List API - not listed all the documents?

拟墨画扇 提交于 2019-12-12 06:28:16
问题 I am trying to list all the documents using Google Drive List API. But it doesn't list all the documents some documents details are not presented in the response. This issue occurred in some of our customer's Drive account. When tried in OAuth2 playground, it results in the same response with missing documents list for these users. Note : scope I used https://www.googleapis.com/auth/drive File mimetype is "application/vnd.google-apps.spreadsheet" Can anyone please help me to find out the

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

大城市里の小女人 提交于 2019-12-12 06:15:41
问题 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? 回答1: 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

Google Documents List API file upload 400 response

只谈情不闲聊 提交于 2019-12-12 05:37:20
问题 I am writing my own implementation of the Google Drive client for the Android and I am using the docs list api. Recently I've encountered a following problem: At first I was using the HttpURLConnection to upload the file but it seems like it writes the data to the socket after a call to getResponseCose(), not when I am writing to the connection's OutputStream, which is a must for me. Then I've switched to the Apache HttpClient but I'm still getting a 400 response, not sure why. Maybe you will

Document not found

牧云@^-^@ 提交于 2019-12-12 05:01:31
问题 I'm trying to download documents and for that working with document list api. Getging feed from https://docs.google.com/feeds/default/private/full of docuemnts and iterating over it, geting entry to download documents. Big part of the documents are downloaded fine, but there part of them that throws ResourceNotFoundException, here the trace: at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:591) at com.google.gdata.client.http.GoogleGDataRequest

Google Apps Script: Finding text and setting cursor to found text

浪子不回头ぞ 提交于 2019-12-12 04:56:57
问题 I would like to setCursor to the location that is returned by findText. Here is what I am trying: var position = doc.newPosition(foundElement.getElement(), foundElement.getStartOffset()); doc.setCursor(position); But, the cursor does not move. Even with the simple examples like //setting cursor at the beginning of the doc var paragraph = doc.getBody().getChild(0); var position = doc.newPosition(paragraph.getChild(0), 0); doc.setCursor(position); findText returns a rangelement, while document

Automatic/Programmatically enable Apps Scripts Addon's on Google Docs

坚强是说给别人听的谎言 提交于 2019-12-12 04:36:01
问题 I'm searching for this like crazy and I just can't find a answer. Imagine this. I have a "master" account. Using the Docs API I will grant access to users to some documents. But I need my addon enabled in every file. The users that will have access to the documents are not under my organization G Suite or anything. They are random gmail users. Is there any way to do it? (besides of doing it manually) I couldn't find it in the documentation. 回答1: It's not possible to disable an add-on, but an

how to find whole path of Google Apps Drive Documents using deprecated apis 3.0

僤鯓⒐⒋嵵緔 提交于 2019-12-12 02:55:18
问题 I am using Google Apps Drive APIs 3.0 . This API is deprecated but it is in maintenance phase. I want to find a path of Google Drive document. e.g. test/test1/test2/test3/testDoc.txt As of now, I am able to retrieve all the documents but without directory path. I want to show the whole path of a drive document. I believe, there is no API to retrieve the whole parent path or parent link. getFolders() method of DocumentListEntry is now deprecated is not able to show the folders path. I

How to use paging for retrieving Google docs?

五迷三道 提交于 2019-12-12 02:26:42
问题 I wand to receive google docs info with paging using Java Client Library. My code: private static final String URL_STRING = "https://docs.google.com/feeds/default/private/full/"; public List<DocumentListEntry> getAllDocs() throws Exception { URL feedUri = new URL(URL_STRING); DocumentQuery query = new DocumentQuery(feedUri); query.setMaxResults(2); query.setStartIndex(1); DocumentListFeed feed = client.getFeed(query, DocumentListFeed.class); return feed.getEntries(); } And processing entries: