google-docs

Is there a good R API for accessing Google Docs?

核能气质少年 提交于 2019-12-20 08:59:32
问题 I'm using R for data analysis, and I'm sharing some data with collaborators via Google docs. Is there a simple interface that I can use to access a R data.frame object to and from a Google Docs spreadsheet? If not, is there a similar API in other languages? 回答1: There are two packages: RGoogleDocs on Omegahat: the package allows you to get a list of the documents and details about each of them, download the contents of a document, remove a document, and upload a document, even binary files.

How To Format A Block of Code Within a Presentation? [closed]

大兔子大兔子 提交于 2019-12-20 08:17:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am preparing a presentation using Google Slides, though I can also work on the presentation within Open Office that will include code snippets. Is there any easy way to perform basic syntax highlighting on the code snippets with either Google Docs or Open Office Presenter? Edit: Since I believe that I can find

How can I get the next or previous character of findText()

独自空忆成欢 提交于 2019-12-20 07:39:41
问题 How can I get the next or previous character of findText() . function myFunction() { var doc = DocumentApp.getActiveDocument(); var str = doc.getbody(); var i = "f"; var x = str.findText(i); var y = str[str.index(x)-1]; Logger.log(y); } It is not working. and get some error. Example: string = "Abcdefgh" , var x=string.findText("f"); after found "f"; want to get previous char of "f". which is "e" in this case. I want to know special function in google script to get 回答1: Flow: getBody() returns

Sum vertically until empty cell on Google Sheets

筅森魡賤 提交于 2019-12-20 07:32:12
问题 This is the scenario. I need to get the sum of the values until it reaches a blank cell. After that it should start again calculating the sum after the blank cell. I need to add the fat and carbs of every ingredient of each dish individually. This is the expected result. That for each of hundreds of dishes. In this case I entered the data manually: I tried with this but is adding all of the data from the column: IF(SUM(C3:C)="","",SUM(C3:C))) I also tried with this formula but is not working:

Sum vertically until empty cell on Google Sheets

倾然丶 夕夏残阳落幕 提交于 2019-12-20 07:31:06
问题 This is the scenario. I need to get the sum of the values until it reaches a blank cell. After that it should start again calculating the sum after the blank cell. I need to add the fat and carbs of every ingredient of each dish individually. This is the expected result. That for each of hundreds of dishes. In this case I entered the data manually: I tried with this but is adding all of the data from the column: IF(SUM(C3:C)="","",SUM(C3:C))) I also tried with this formula but is not working:

Mail merge: can't append images from template

北城以北 提交于 2019-12-20 07:07:20
问题 I'm trying to create a mail merge function to create a document based on a simple template. I tried to use the following function to copy the template elements but I'm having problems with the (inline) images, they appear always as PARAGRAPH and not INLINE_IMAGE and the following icon appears instead of the images: Here's the code: function appendToDoc(src, dst) { // iterate accross the elements in the source adding to the destination for (var i = 0; i < src.getNumChildren(); i++) {

Importing a HTML table into a google doc using google app script

删除回忆录丶 提交于 2019-12-20 06:45:04
问题 I'm importing data from JIRA into a Google Doc. One of the fields would be the description, which is basically HTML text. Is there any way to "add" this HTML text on a Google Doc? Or do I really have to parse it manually and create paragraphs, tables, etc.? The HTML could look as follows: <p>Hello There</p> <table class='confluenceTable'> <tbody> <tr> <th class='confluenceTh'> Name </th> <th class='confluenceTh'> Hours </th> <th class='confluenceTh'> Cost </th> </tr> <tr> <td class=

Google Sheet add-on onInstall() and onOpen() not working

房东的猫 提交于 2019-12-20 06:36:32
问题 I am trying to create an add-on for Google Sheets, but running in the problem. The add-on creates additional menu in "Add-on" menu using onOpen() function of Google Drive API, but it does not do that onInstall() . So I have been told to add the folloing function onInstall(e) { onOpen(e) } now, what I have tried to do is the following, but it still does not work function onInstall() { SpreadsheetApp.getUi().createAddonMenu() .addItem('Browse My Add-on', 'browseMyAddOn') .addToUi(); } function

How to know if a google account is under a google apps domain?

心已入冬 提交于 2019-12-19 16:51:13
问题 I am working on an app that allows user to share their Drive files to friends. But there is a problem of Google App Account, like someone@somadomain.com , of which files cannot be shared with people who are not under that domain. Although the share policy can be changed by admin of somedomain.com , but I prefer not allowing people use my app with Google Apps Account. I also check this post: How to determine if the account is a Google apps account?. But I don't agree with the idea of checking

Open a save file dialog for a js variable

ε祈祈猫儿з 提交于 2019-12-19 10:46:30
问题 In my web app I need to give the user the option to save a js variable as a file (when the user clicks download, the app offers him to save a file, preffereably as .js file). Similarly as google docs offers you to save a file. Is it possible for javascript to pass it's variable this way? 回答1: Check out Downloadify which allows exactly this. Downloadify is a tiny JavaScript + Flash library that enables the generation and saving of files on the fly, in the browser, without server interaction.