google-docs-api

Google script : how to resize image in blob?

夙愿已清 提交于 2019-12-11 08:19:45
问题 I have a blob containing an image that is remotely loaded and created in Google Drive: var response = UrlFetchApp.fetch(fileURL); var fileBlob = response.getBlob(); var folder = DriveApp.getFolderById('THjgj698979XXXXXXXX'); var result = folder.createFile(fileBlob); What I want is to resize the image contained in this fileBlob. How can I do that? For your information, a post that can help but finally didn't really help me:(explains how to resize an image, not how to resize an image in a blob)

Why is my for loop of body.replaceText function in Google Document Script stopping?

我的梦境 提交于 2019-12-11 08:06:41
问题 I am trying to write a merg script using goolge documents and referencing a seperate spreadsheet. I am currently stuck, it doesn't replace any of the content and the forloop stops at i=0. Here is the code: function myMerger(body, myArrayOfWords, myArrayOfData){//this function will replace the terms found in myArrayOfWords with Logger.log(' just starter myMerger'); Logger.log('myArrayOfWords.length is '+myArrayOfWords.length); Logger.log('myArrayOfData.length is ' +myArrayOfData.length); for(i

Embedded Viewer API for custom documents

て烟熏妆下的殇ゞ 提交于 2019-12-11 06:14:12
问题 I would like to build a web page that list documents that are searchable & scrollable pagewise, this is very similar the the Google Books and within that space, similar to the Embedded Viewer API. I understand the the API works only from the content from Google books, is there an equivalent API that can do the very same thing on the files supplied by the user or application that is not necessarily in the google books. I also looked at google doc viewer API, features wise it appears basic

Is there any Web API for Google web clipboard?

℡╲_俬逩灬. 提交于 2019-12-11 05:43:02
问题 Google Docs have a feature "Web Clipboard" to help users easily copy and paste cross google documents. (you can refer to https://drive.googleblog.com/2010/02/a-web-clipboard-for-google-docs.html) But I am wondering that if there's any Web API or official way to access those API. I try to find in Google Document List APi (https://developers.google.com/google-apps/documents-list/), I can't find any related stuff. The original goal for me is I want to copy some screenshot/images/text from my

Google AppScript dies with “Service Unavailable: Docs”

自作多情 提交于 2019-12-11 04:39:29
问题 I wrote an app script that should break down a wall of text into separate paragraphs. function onOpen() { DocumentApp.getUi() .createMenu('Formatting tool') .addItem('Make Paragraphs', 'breakIntoParagraphs') .addToUi(); } function breakIntoParagraphs() { var body = DocumentApp.getActiveDocument().getBody(); var counter = 0; body.replaceText("\\v\\v+", "°"); // the ° is more convenient to handle var rangeElement = body.findText("°"); while (rangeElement != null) { var start = rangeElement

Google Docs API: Do document resource ID's ever change?

房东的猫 提交于 2019-12-10 23:53:37
问题 Is it wise to build a website like environment where all links are based on resource ID's from documents? Did document ID's ever change in the past, can/will they in the future? Past week we were surprised to see a collection where it looks like some ID's of documents had changed, is this possible? 回答1: The id is a unique, permanent identifier for the entry, so it should never change. 来源: https://stackoverflow.com/questions/11274319/google-docs-api-do-document-resource-ids-ever-change

OAuth2Parameters could not be found

痞子三分冷 提交于 2019-12-10 18:53:00
问题 I'm trying to use OAuth 2.0 for authorizing google docs API, According to the example given by google at https://developers.google.com/google-apps/documents-list/#authorizing_requests_with_oauth_20 they are using the piece of code: // OAuth2Parameters holds all the parameters related to OAuth 2.0. OAuth2Parameters parameters = new OAuth2Parameters(); // Set your OAuth 2.0 Client Id (which you can register at // https://code.google.com/apis/console). parameters.ClientId = CLIENT_ID; // Set

Retrieve a range of rows from Google Spreadsheet using list-based feed API and “sq” parameter

被刻印的时光 ゝ 提交于 2019-12-10 18:49:20
问题 My goal is to retrieve a range of rows from a Google Worksheet using the sq parameter in a standard cURL call--the API's protocol method. I know that the Google Sheets documentation explains the sq parameter by way of example. In that documentation example, it uses column header names with comparison operators, but is there a way to retrieve a range of rows specified by a start and end row index using the sq parameter? I am aware of the fact that one could use Google's Visualization API to do

Add row in spreadsheet (List-based feed) but it not works

℡╲_俬逩灬. 提交于 2019-12-10 15:44:40
问题 I have used the bellow code to add row in spreadsheet (List-based feed) but it not works ... NSMutableArray * array = [[NSMutableArray alloc] init]; GDataEntrySpreadsheetList *listEntry = [GDataEntrySpreadsheetList listEntry]; GDataSpreadsheetCustomElement *serialNo = [GDataSpreadsheetCustomElement elementWithName:@"SNo" stringValue:@"1"]; [array addObject:serialNo]; [listEntry setCustomElements:array]; //then after finding the worksheet GDataServiceGoogleSpreadsheet *service = [self

google doc reader : remove the option “Open in new window”

空扰寡人 提交于 2019-12-10 15:04:30
问题 Is there any way of removing or disabling the 'open in new window' icon of google doc reader( when used in embedded mode interface) through the embedded code(which we write for embedding documents) or javascript/jquery? 回答1: I don't know if there is any standard method. If you really want to do it, then you can try something like this. <html> <body> <div style='position:relative;'> <div style='background-color:White;top:0px; height: 47px; position: absolute; left:0px; width: 100%;'></div>