【问题标题】:Inserting a Bar Chart into a Google Doc using Google Apps Script使用 Google Apps 脚本将条形图插入 Google Doc
【发布时间】:2018-01-24 11:13:25
【问题描述】:

我正在使用 Google Apps 脚本根据我在 Google 工作表中的数据构建 Google 文档。我想使用 Google Apps 脚本从电子表格中的一些数据构建条形图。我已经弄清楚如何生成图表,但我看不到如何将图表插入到实际文档中。

【问题讨论】:

标签: google-apps-script


【解决方案1】:

如果您使用应用程序脚本构建了图表;图表服务然后您可以将其作为图像插入。不过可能有更好的方法。

  var myChartBlob = myChart.getAs('image/png').copyBlob();
  var myChartImage = docBody.appendImage(myChartBlob);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多