google-slides-api

Downloading a Google Slides presentation as PowerPoint doc using Google Apps Script?

家住魔仙堡 提交于 2019-12-20 03:22:14
问题 The GUI of Google Slides offers to download a GSlides presentation as a Powerpoint (myFile.pptx). I could not find the equivalent in the Google Apps Script documentation - any pointer? EDIT Thanks to comments and answers, I tried this snippet: function testFileOps() { // Converts the file named 'Synthese' (which happens to be a Google Slide doc) into a pptx var files = DriveApp.getFilesByName('Synthese'); var rootFolder = DriveApp.getRootFolder(); while (files.hasNext()) { var file = files

How to paste Google Sheets Content into a Google Slide using Apps Script?

泪湿孤枕 提交于 2019-12-13 17:26:21
问题 I´m searching now for three days and cannot find a method to get a Google Sheets Range into a Slide. var range = SpreadsheetApp.getActive().getActiveSheet().getRange('A1:B3'); var slidesPage = SlidesApp.openById(presentationId).getSlides()[0]; slidesPage.insertTable(range); It seems it is only possible to copy a table from another slide and paste it into the page. Why is it not possible to paste a range from a spreadsheet into the Slide?. At least it is possible manually. Thanks for every

Updating linked table in Google Slides API

我是研究僧i 提交于 2019-12-13 12:22:21
问题 I see that there's a method for updating a linked Chart in a Slide (RefreshSheetsChartRequest), but in my presentation I have Tables pasted in from Google Sheets that are linked to data in a spreadsheet. I can update these manually by clicking the update buttons in the Slides UI, but is there a way to use the API to update all the linked tables in a sheet programmatically? 来源: https://stackoverflow.com/questions/45280944/updating-linked-table-in-google-slides-api

How to attach Google Slides with Gmailapp sendemail

五迷三道 提交于 2019-12-13 04:35:57
问题 I am trying to send some google slides from the drive as attachment to Gmailapp sendemail function. It always seem to send pdf, and if I use blob it sends a corrupt file which doesnt open on windows. Here is what I am doing: function testemail() { var email = "name@domain.com"; var subject = "hello world"; var body = "testing"; var flyerFile = DriveApp.getFileById("1fiopyqtue"); var flyerBlob = flyerFile.getBlob(); GmailApp.sendEmail(email,subject ,body, {attachments:[flyerFile.getAs(MimeType

Unable to export a google slide as pdf format on server side

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 04:54:10
问题 Here is my code for testing exporting files from google drive on server side. import logging from flask import Flask, render_template, request from googleapiclient.discovery import build from googleapiclient.http import MediaIoBaseDownload from oauth2client.client import AccessTokenCredentials import httplib2 import io app = Flask(__name__) @app.route('/gdrive/selectcallback') def userselectioncallback(): print "In user selection callback... " code = request.args.get('user_token') fileId =

Bring the pageElements to front or back using apps script in Google Slides

独自空忆成欢 提交于 2019-12-11 18:55:35
问题 The stacking order is determined by the order by which they are inserted into the slide. However, some of the page elements in slides remain hidden. Is there a way to change the Order of objects in Google slides using apps script? 回答1: How about this workaround? I have experienced the same situation with you. At that time, I have moved the element using this workaround. I think that there are several workarounds for this situation. So please think of this as one of them. The flow of this

Google Slides API activating script on click of element

…衆ロ難τιáo~ 提交于 2019-12-11 02:17:56
问题 I am trying to create a branching scenario using google slides, the idea is that someone viewing the presentation can click on the buttons and see the outcome of their selections. The first few slides it's easy, it's a 1 to 1 so I can just use the "link" feature in slides. The tricky part is once you progress to slide 3. I want the slide they are directed to by clicking on the "course of action" options to be based on all the currently selected options. So here is where I'm stuck - I need to

How do you tell whether text fits within its bounding shape using Google Slides API?

半世苍凉 提交于 2019-12-10 16:48:55
问题 I am doing a merge of data from a google spreadsheet to a slides presentation using placeholder shapes and apps script, something along the lines of this example. I have the merge working well. The first issue I am having though is that the text is not bound by the shape that contains it. If the text does not fit within the bounding shape it simply overflows: That wouldn't be such a problem if i could then somehow tell programatically that the text has overflowed. As far as I can tell though

How to skip slides in Google Slides with Google Apps Script?

﹥>﹥吖頭↗ 提交于 2019-12-10 14:01:35
问题 In Google Slides, it is possible to skip a slide manually by right clicking on it and selecting "Skip slide". In that case, the slide will not show up when being presented. I cannot seem to recreate this programmatically with Google Apps Script. Does this function exist, or is there any workaround here? 回答1: Skipping slides via Slides API is not available at the moment. There is feature request https://issuetracker.google.com/issues/112692346 you can "star" it. 来源: https://stackoverflow.com

What's the equivalent of z-index (arrange order) send to back / bring to front with Slides API?

人盡茶涼 提交于 2019-12-08 17:22:27
I am calling the slides API and retrieving multiple shape elements on a slide. These shapes are on top of each other, so only the one is visible. Is there a way from the API of telling which element is "visible" and in front? The list of PageElement objects returned in Page.pageElements should be ordered by z-index, from back to front. I dont see this mentioned in the API docs, but you should be able to verify it yourself by playing with a few shapes in the Slides editor and checking the order they are returned by the API. 来源: https://stackoverflow.com/questions/42123546/whats-the-equivalent