google-slides-api

Google Slides - How to automatically update charts linked to a G spreadsheet

安稳与你 提交于 2019-11-29 08:45:59
I have a Google Slides presentation with charts that are linked to a specific Google Spreadsheet. As there are many charts in the presentation, I'm looking for a way to update all these linked charts automatically, or at least all of them at once. What is the best way to do this? Many thanks! You can add a custom function to a dropdown menu in the Slides UI with the following script. This gets the slides from the current presentation, loops through them, gets any charts in each slides and refreshes (updates) them. function onOpen() { var ui = SlidesApp.getUi(); ui.createMenu('Custom Menu')

Create the objectIds map with variable keys for a DuplicateObject request

北慕城南 提交于 2019-11-28 08:46:19
问题 When creating a "duplicate object" request, the objectIds map will not let me put a variable in the emphasized portion below: var alternateSlideId = 'alternate_' + i; { duplicateObject: { objectId: alternateSlide, objectIds: { **alternateSlide**: 'Copied_Alternate_Slide_' + i, } } } (i is a number in a loop) From my understanding the map function works like ((objectId to be copied) : (name of new objectId)) I'm unable to use a variable on the left side of the map function, and I'm unable to

Google Slides - How to automatically update charts linked to a G spreadsheet

青春壹個敷衍的年華 提交于 2019-11-28 01:59:27
问题 I have a Google Slides presentation with charts that are linked to a specific Google Spreadsheet. As there are many charts in the presentation, I'm looking for a way to update all these linked charts automatically, or at least all of them at once. What is the best way to do this? Many thanks! 回答1: You can add a custom function to a dropdown menu in the Slides UI with the following script. This gets the slides from the current presentation, loops through them, gets any charts in each slides