google-slides-api

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

柔情痞子 提交于 2019-12-08 03:27:56
问题 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? 回答1: 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

Cannot create a presentation with PageSize on Google Slides API

丶灬走出姿态 提交于 2019-12-08 00:57:15
问题 I'm trying to create a new 4:3 presentation, not 16:9. I read this reference and write some ruby codes, but it didn't work. The new presentation's height is different from what I specified. Method: presentations.create | Slides API | Google Developers # foo.rb require 'google/apis/slides_v1' Slide = Google::Apis::SlidesV1 # alias slides_service = Slide::SlidesService.new # authorize... new_presentation_object = Slide::Presentation.new( title: "test", page_size: Slide::Size.new( width: Slide:

Google slides auto update links /tables linked from google sheet

六眼飞鱼酱① 提交于 2019-12-06 15:51:53
问题 I have a Google Slides presentation that has some linked cells/table to data in Google Sheets. Currently, I have to manually click each linked cell/table to update values. I need a script for Google Slides that would auto-update / batch-update / refresh these links, so that the values/tables get auto-updated. Is that possible? 回答1: Both yes and no. Charts Yes! those can be batch updated: function onOpen() { SlidesApp.getUi() // Or DocumentApp or FormApp. .createMenu('Update Charts') .addItem(

Cannot create a presentation with PageSize on Google Slides API

我们两清 提交于 2019-12-06 05:11:16
I'm trying to create a new 4:3 presentation, not 16:9. I read this reference and write some ruby codes, but it didn't work. The new presentation's height is different from what I specified. Method: presentations.create | Slides API | Google Developers # foo.rb require 'google/apis/slides_v1' Slide = Google::Apis::SlidesV1 # alias slides_service = Slide::SlidesService.new # authorize... new_presentation_object = Slide::Presentation.new( title: "test", page_size: Slide::Size.new( width: Slide::Dimension.new(magnitude: 6_858_000, unit: 'EMU'), height: Slide::Dimension.new(magnitude: 9_141_000,

Updating linked table in Google Slides API

我只是一个虾纸丫 提交于 2019-12-04 18:23:19
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 paste Google Sheets Content into a Google Slide using Apps Script?

空扰寡人 提交于 2019-12-02 05:16:57
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 help. Tanaike Unfortunately, the range of Spreadsheet cannot be directly put to the table of Slide yet (At

Copy a slide from one google presentation to another

Deadly 提交于 2019-12-02 00:50:32
问题 I am trying to copy slides from a source presentation and append them to the end of destination presentation. I have searched solution on SO but they use the google apps script. I am looking for a solution that can use the google slides or google drive REST API. What I have attempted so far is getting each element of the source presentation's slides and using batch updates to add them to the destination presentation, but obviously this is tedious and does not cover all cases. Does anyone have

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

[亡魂溺海] 提交于 2019-12-01 23:27:00
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.next(); var blobPptx = file.getBlob().getAs('application/vnd.openxmlformats-officedocument.presentationml

Copy one slide from Google Slides into a new presentation using API

China☆狼群 提交于 2019-12-01 11:07:34
I wish to use Google Drive API for creating a new Google Slides, but with one slide copied from another previous presentation. My question is, is that possible to build a new Google Slides and insert slides (singularly) into the new one. Or is it possible to delete the a slide from Google Presentation? Although imperfect, you may be able to get close using the new Google Slides API . You can read the slide from the source presentation and then attempt to replicate it in the destination presentation. At the moment not all Slides features are supported in the API, so there may be some

Copy one slide from Google Slides into a new presentation using API

萝らか妹 提交于 2019-12-01 07:34:08
问题 I wish to use Google Drive API for creating a new Google Slides, but with one slide copied from another previous presentation. My question is, is that possible to build a new Google Slides and insert slides (singularly) into the new one. Or is it possible to delete the a slide from Google Presentation? 回答1: Although imperfect, you may be able to get close using the new Google Slides API. You can read the slide from the source presentation and then attempt to replicate it in the destination