google-docs-api

Unable to add text to new Google Doc via Docs API

最后都变了- 提交于 2020-03-05 05:16:19
问题 My program is creating documents and each document has text that needs to go into it. Any attempt to call an InsertTextRequest invokes an error. List<Request> requests = new ArrayList<>(); requests.add(new Request().setInsertText(new InsertTextRequest() .setText("Simple test.") .setLocation(new Location().setIndex(0)))); BatchUpdateDocumentRequest body = new BatchUpdateDocumentRequest() .setRequests(requests); BatchUpdateDocumentResponse response = docService.documents() .batchUpdate(file

Can anything done with google apps scripts be done with the google API?

冷暖自知 提交于 2020-02-25 04:15:27
问题 I noticed that the Google Apps Script editor uses a Bearer token to make requests for a lot of things, that got me thinking: Is it possible to do all functions that are done with the google apps script with the google API on your own server? What is the essential difference? Just the fact that google apps script runs on google servers, while with the google API you would need to create your own servers? For example many of the document functions, which I thought could only be done with the

Docx to Google Doc using Google Script

橙三吉。 提交于 2020-01-17 03:45:13
问题 I have a lot of docx files ( ~ 72 ) , their MIMETYPE is : application/vnd.openxmlformats-officedocument.wordprocessingml.document and I want to convert all of them to GoogleDocument so I can edit them online to do so I need them to be application/vnd.google-apps.document Is this possible ? I've tried with blob but nothing works , there is a way to create a new google doc with the same format ? 回答1: Got it . var docx = DriveApp.getFileById("###"); var newDoc = Drive.newFile(); var blob =docx

Class 'Google_Service_Docs' not found (Google Docs API quickstart.php)

£可爱£侵袭症+ 提交于 2020-01-16 14:39:42
问题 I am following this guide to authorize access of my website to the Google Docs API but I am having trouble getting through step 4. When I run this command in the SSH command line as per step 4 the guide: $ php quickstart.php nothing happens within the command line, although I have an error log in the working directory and the following appears: [08-Feb-2019 09:47:23 America/New_York] PHP Fatal error: Uncaught Error: Class 'Google_Service_Docs' not found in /home/***/***/composer/quickstart

Scan a google document line by line

早过忘川 提交于 2020-01-15 03:26:09
问题 so basically, I'm trying to use node.js to scan a google document, then if a ROBLOX id is on there it tracks it. When it tracks it, if it joins one of the groups in the id list, it auto-exiles it. Any help? I'm a little stuck on the scanning a google document line by line. 回答1: I am not sure about how to do it from a google doc, but if you are willing to move to using text files( .txt ) I think I could be of assistance. Using Nodes FS we can read lines using a Line reader import * as fs from

How can a Dart application read cell data from google spreadsheets

拈花ヽ惹草 提交于 2020-01-12 05:48:06
问题 What are the possible options and setups one would need for reading data out of a google docs spreadsheet into a dart web application? Does dart need the wrapper around gdata REST api to do this? Has any dart project or sample interacted with google docs? 回答1: Newer Google APIs have a common API infrastructure where the client libraries are always up to date. There is such a client library for Dart (http://docs.google-api-dart-client.googlecode.com/git/index.html). However, it looks like

Documents deleted using Google Docs API still visible in Google Drive

徘徊边缘 提交于 2020-01-04 10:59:49
问题 I've built an integration using the Google Docs API (using GData) allowing users to create/edit documents from another application. Originally, when documents were deleted we would have them permanently deleted. They were no longer visible in Google Docs or Google Drive. Now when they are deleted using the Google Docs API, they are still present in the list of Documents in Google Drive. When you attempt to follow the link to the document you arrive at the "Sorry, the page (or document) you

How to use both Google Drive API and the chrome web payments licensing API

谁说胖子不能爱 提交于 2020-01-04 04:14:46
问题 UPDATE to clarify the question... In attempting google drive example app Dr edit for php working in our test app which had already successfully implemented the licensing API, https://developers.google.com/chrome/web-store/docs/samples#php, we got an 'error saving' message and a syntax error from dredit.js trying to log error to console. We realized that we needed to update the existing apps manifest.json with some needed info, setting the CONTAINER to GOOGLE_DRIVE and the id from API console.

app-script google doc copy table with inline image

我们两清 提交于 2020-01-03 05:58:11
问题 I am trying to copy the contents of a GDoc into another GDoc. This works pretty well for all the different element types. Including a table (Enum DocumentApp.ElementType.TABLE). However, if the table contains an inline image (Enum DocumentApp.ElementType.INLINE_IMAGE) the image is not copied correctly. Here is a link to the source GDoc example. https://docs.google.com/document/d/14kXjC0CTkEgmD7Ttv0YKL9ubfDRHbL1hCVOqOiyiEDU/edit#. Find the row in the table with the New Zealand flag. The flag

Uploading Any File To Google Docs Using GData

荒凉一梦 提交于 2020-01-03 05:06:26
问题 I'm trying to use the Google Docs GData API (.NET) to upload a file to my docs, but I keep getting errors thrown. I can't find any example that uses this method, so I'm not even sure that I am usign it correctly. DocumentsService docService = new DocumentsService("MyDocsTest"); docService.setUserCredentials("w****", "*****"); DocumentsListQuery docQuery = new DocumentsListQuery(); DocumentsFeed docFeed = docService.Query(docQuery); foreach (DocumentEntry entry in docFeed.Entries) { Console