应用程序脚本文档似乎表明可以将表格从一张幻灯片复制到另一张幻灯片 - 但我似乎无法让它工作。这是我使用过的脚本 - 对我做错了什么有什么想法吗?这是“使用”中示例的链接。
* @OnlyCurrentDoc
*/
/*
Instructions copied from https://developers.google.com/apps-script/reference/slides/slide#insertShape(ShapeType)
// Copy a table between presentations.
var otherPresentationSlide = SlidesApp.openById('presentationId').getSlides()[0];
var currentPresentationSlide = SlidesApp.getActivePresentation().getSlides()[0];
var table = otherPresentationSlide.getTables[0];
currentPresentationSlide.insertTable(table); // Also available for Layout, Master, and Page.*/
function test(){
var slide2 = SlidesApp.getActivePresentation().getSlides()[1];
var table = SlidesApp.getActivePresentation.getPageElementById('g2c6eee07fad_0_0').asTable();
slide2.insertTable(table);