google-slides

Using Google appscript to refresh tables pasted in from Google sheets into Google slides

旧街凉风 提交于 2020-03-23 07:27:44
问题 This question here has as succinct solution for updating Google Sheets charts linked to Google slides. function onOpen() { var ui = SlidesApp.getUi(); ui.createMenu('Custom Menu') .addItem('Batch Update Charts', 'batchUpdate') .addToUi(); } function batchUpdate(){ var gotSlides = SlidesApp.getActivePresentation().getSlides(); for (var i = 0; i < gotSlides.length; i++) { var slide = gotSlides[i]; var sheetsCharts = slide.getSheetsCharts(); for (var k = 0; k < sheetsCharts.length; k++) { var

Google script replaceAllShapesWithImage with image from drive doesn"t work any more

扶醉桌前 提交于 2020-03-10 04:37:35
问题 Since yesterday one of my google script doesn't work anymore. The script take an image on the drive copie a slide replace a shape with an image But I got this error: "The provided image is in an unsupported format." -> I give all access to the image: it doesn't change anything -> The script work if I take an url outside the drive Any idea function test_image(){ var imageUrls = DriveApp.getFilesByName("DSC_3632.png"); var file = "undefined"; while ( imageUrls.hasNext()) { var file = imageUrls

Google script replaceAllShapesWithImage with image from drive doesn"t work any more

有些话、适合烂在心里 提交于 2020-03-10 04:35:10
问题 Since yesterday one of my google script doesn't work anymore. The script take an image on the drive copie a slide replace a shape with an image But I got this error: "The provided image is in an unsupported format." -> I give all access to the image: it doesn't change anything -> The script work if I take an url outside the drive Any idea function test_image(){ var imageUrls = DriveApp.getFilesByName("DSC_3632.png"); var file = "undefined"; while ( imageUrls.hasNext()) { var file = imageUrls

TypeError: Cannot read property 'insertSlide' of null (line 60, file “Code”)

懵懂的女人 提交于 2020-03-04 21:35:02
问题 Would be grateful for any guidance on how to fix this error. Please see below code which gives the error, // Copy a slide from another presentation and inserts it. var otherPresentation = SlidesApp.openById('1Fz6YWCyLIdHfDoonz-40qRlmnNCWwROIQjXqYwmRxS8'); var currentPresentation = SlidesApp.getActivePresentation(); var slide_v1 = otherPresentation.getSlides[0]; var insertionIndex = 1; currentPresentation.insertSlide(insertionIndex, slide_v1); 回答1: Thanks to Tanaike and some changes to the

TypeError: Cannot read property 'insertSlide' of null (line 60, file “Code”)

为君一笑 提交于 2020-03-04 21:34:13
问题 Would be grateful for any guidance on how to fix this error. Please see below code which gives the error, // Copy a slide from another presentation and inserts it. var otherPresentation = SlidesApp.openById('1Fz6YWCyLIdHfDoonz-40qRlmnNCWwROIQjXqYwmRxS8'); var currentPresentation = SlidesApp.getActivePresentation(); var slide_v1 = otherPresentation.getSlides[0]; var insertionIndex = 1; currentPresentation.insertSlide(insertionIndex, slide_v1); 回答1: Thanks to Tanaike and some changes to the

How to programmatically create a list of Google Apps Script projects owned by me?

你说的曾经没有我的故事 提交于 2020-01-11 07:47:09
问题 Google Apps Scripts projects could be standalone, bounded to Google apps (Docs, Sheets), Web Apps or Google Sites gadgets. How could I find all the projects owned by me from a single point? The Class File, Class Document, Class Spreadsheet, Class Slide and Class Sites from Apps Script doesn't include a method to know if the corresponding container has a Script project bounded to them. Only standalone Script projects are shown in Google Drive. Update: Nowadays (2018) it's possible to find all

Google Apps Script: How to create slides on Google Slides and fill the placeholders in it with information from an array?

妖精的绣舞 提交于 2020-01-05 05:30:08
问题 I have an array and am trying to use the information in it to create a Google Slides presentation. I would like some help and, if possible, also point me to some material that I could read to better understand the possible solutions to these problems. The array is as the following: var myArray = [[Project1,Status1,Info1],[Project2,Status2,Info2],...,[ProjectN,StatusN,InfoN]] Each element in the array refers to a different project and contains: the name of the project, the status of the

Finding whether the slide is skipped or not using GAS

若如初见. 提交于 2019-12-24 00:39:06
问题 I want to check among the slides, whether a slide is skipped or not? I have referred the API as well as slide service buy I couldn't find a way to determine the skipped slide. How do I write a custom code slide.isSkipped() which will return true if skipped or false if not. 来源: https://stackoverflow.com/questions/47740005/finding-whether-the-slide-is-skipped-or-not-using-gas

Get Layout's display name of a Google Presentation Slide via Google Apps Scripts

一个人想着一个人 提交于 2019-12-22 06:28:39
问题 I am trying to append a new slide to my presentation with a created layout via Google Apps Scripts. I started a new presentation, created two new layouts, named them as ' BulletDescription ' and ' TextDescription '. I can get all the layouts available in the presentation. However, I can't find the layouts which I manually created by their names. function AddNewSlideToPresentation(LayoutType) //LayoutType = 'BulletDescription' { var presentation = SlidesApp.openById('PresentationID'); var

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