google-docs

using google docs api from within google apps script

♀尐吖头ヾ 提交于 2020-03-24 00:08:52
问题 I'm trying to use the following code from the google docs API from within google apps script for testing purposes: var f = UrlFetchApp.fetch("https://docs.googleapis.com/v1/documents/1ys6KIY1XOhPHrgQBJ4XxR1WDl0etZdmR9R48h2sP2cc:batchUpdate", { method:"post", body: JSON.stringify({ "requests": [ { "deleteContentRange": { "range": { "startIndex": 1, "endIndex": 80 } } } ] }), headers: { Authorization:"Bearer " + ScriptApp.getOAuthToken(), "Content-Type": "application/json" } }) Logger.log(f)

MailApp.sendEmail Not Working?

爷,独闯天下 提交于 2020-03-09 04:39:08
问题 I have several scripts in Google Docs spreadsheets that use MailApp.sendEmail to send e-mails incorporating data from the spreadsheets. They've all worked marvelously for years. About 2 weeks ago, they stopped sending the e-mails. The scripts still run and I don't get any errors. The e-mails just never come through. Nothing has changed, except that the e-mails aren't arriving anymore. Any thoughts? Thanks! 回答1: I think I have an answer to my own question, which may be helpful to anybody else

Google docs formatting, converting texts into sheets

こ雲淡風輕ζ 提交于 2020-02-04 01:28:14
问题 I've had success in sending a google docs file into a google sheets and the spreadsheet managed to fill itself in correctly (it formats the text into a table, very neat) Below is an example of how I'm formatting my text: ID, NAME, MOBILE, CITY, COUNTRY, BIRTHDAY, 3, NameGoesHere1, 21 98658 5548, abcity, countryNameHere, 1998-05-02, 6, SomeoneElse Joined Here, 21 98535 1218, whereland, Far far away, 1989-11-15, 5, AnotherCustomer, 21 85482 5245, somecity, Somewhereland, 1999-08-04, ID, PRICE,

How do I center a table in a google document page using Google Apps Script

寵の児 提交于 2020-01-30 06:54:01
问题 I have inserted a table in a google docs using the Google Apps Script function var grg = body.appendTable(griglia); I am able to format the text in the table (font size, weight, alignment) and I can format individual cells (background, foreground, borders). However the table is aligned left, and I would like it to be (horizontally) centered in the page. From the google docs user interface this can be done from the menu "Table>Table properties", which generates a dialog box with a dropdown

How do I center a table in a google document page using Google Apps Script

心已入冬 提交于 2020-01-30 06:50:23
问题 I have inserted a table in a google docs using the Google Apps Script function var grg = body.appendTable(griglia); I am able to format the text in the table (font size, weight, alignment) and I can format individual cells (background, foreground, borders). However the table is aligned left, and I would like it to be (horizontally) centered in the page. From the google docs user interface this can be done from the menu "Table>Table properties", which generates a dialog box with a dropdown

Getting the download link for a public Google Docs file

可紊 提交于 2020-01-22 09:53:30
问题 Reading the Google Docs API I find this: Downloading Files cannot be downloaded in a format other than the one in which they were originally uploaded. The download URL for files looks something like this: https://doc-04-20-docs.googleusercontent.com/docs/secure/m7an0emtau/WJm12345/YzI2Y2ExYWVm?h=16655626&e=download&gd=true Given a public Google Documents file URL, say, https://docs.google.com/open?id=0B1-vl-dPgKm_NTNhZjZkMWMtZjQxOS00MGE1LTg2MjItNGVjYzdmZjYxNmQ5 How can I turn it into a

Why is google apps spreadsheet setValue function not setting values in cells?

十年热恋 提交于 2020-01-17 04:21:49
问题 Why can't I use setValues in google apps spreadsheets API to set the values of cells in a spreadsheet? I entered the correct cell and the value seems ok. however nothing appears in the cells! I used the following to create the rows after the first row in my sheet. sheet.insertRowsAfter(1,15); After which I did this sheet.setActiveCell("C2").setValue("AAA"); 回答1: The problem is that you need to get the range before you can set values into it. Your code should be: sheet.getRange("c2").setValue(

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

Google Docs - programmatically send mouse click to an item in outline pane

て烟熏妆下的殇ゞ 提交于 2020-01-14 13:09:24
问题 In Google Docs you can open outline pane and see all headers in the document, you can also click on an header and the view will scroll to header. My question is how simulate mouse click programmatically with JS in Chrome extention, to scroll the view to the desired header? I tryed following code but nothing hapend: // usage: eventFire(document.getElementById('mytest1'), 'click'); function eventFire(el, etype) { if (el.fireEvent) { el.fireEvent('on' + etype); } else { var evObj = document