I have a chart within google sheets that I would like to have automatically update in google slides every hour. I know you can refresh using the Tools menu and selecting linked objects but I would really like to automate this process without use of a Slides AddOn
If my understanding is correct, how about this answer? Please think of this as just one of several possible answers.
In this pattern, all charts in all slides in the Google Slides are refreshed.
function myFunction() {
var slidesId = "###"; // Please set the Slides ID.
SlidesApp.openById(slidesId).getSlides()
.forEach(function(s) {
s.getSheetsCharts().forEach(function(c) {
c.refresh();
});
});
}
In this pattern, all charts in 1st slide in the Google Slides are refreshed.
function myFunction() {
var slidesId = "###"; // Please set the Slides ID.
SlidesApp.openById(slidesId).getSlides()[0]
.getSheetsCharts()
.forEach(function(c) {
c.refresh();
});
}
myFunction()
. By this, myFunction()
is run every 1 hour.If I misunderstood your question and this was not the direction you want, I apologize.