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.
Unfortunately, the range of Spreadsheet cannot be directly put to the table of Slide yet (At least for now). So how about this workaround? The flow of this sample script is as follows.
Sample script :
Note :
presentationId
.References :
If this was not wha you want, I'm sorry.
Edit :
In this modified script, the following points were added.
getDisplayValues()
. By this, the format can be copied.Modified script :
References :