【发布时间】:2018-01-24 11:13:25
【问题描述】:
我正在使用 Google Apps 脚本根据我在 Google 工作表中的数据构建 Google 文档。我想使用 Google Apps 脚本从电子表格中的一些数据构建条形图。我已经弄清楚如何生成图表,但我看不到如何将图表插入到实际文档中。
【问题讨论】:
我正在使用 Google Apps 脚本根据我在 Google 工作表中的数据构建 Google 文档。我想使用 Google Apps 脚本从电子表格中的一些数据构建条形图。我已经弄清楚如何生成图表,但我看不到如何将图表插入到实际文档中。
【问题讨论】:
如果您使用应用程序脚本构建了图表;图表服务然后您可以将其作为图像插入。不过可能有更好的方法。
var myChartBlob = myChart.getAs('image/png').copyBlob();
var myChartImage = docBody.appendImage(myChartBlob);
【讨论】: