Chart image in email from Google spreadsheet with google-apps-script returns white image

后端 未结 2 1400
春和景丽
春和景丽 2021-01-25 04:02

I\'m sending a report every night to my own gmail address. Suddenly since a week or so the image of the chart has turned blank. There is only one chart.

function         


        
2条回答
  •  广开言路
    2021-01-25 04:50

    Not sure why this would have stopped working, but you might want to try dropping the "getBlob()" part and see if that helps. Documentation suggests the below code should work.

    var areaBlob = charts[0].getAs('image/png').setName("areaBlob");
    

    https://developers.google.com/apps-script/reference/spreadsheet/embedded-chart#getAs(String)

提交回复
热议问题