相关疑难解决方法(0)

SpreadsheetApp.insertImage 服务器错误

为什么下面的代码在 GSuite 电子表格中返回“服务器错误”?

function test() {
  var ss = SpreadsheetApp.openById('1Wc6nKxxxxxxxxxxxxxxxxxx0Ld6QyaY');
  var sheet = ss.getSheetByName('2018.0801-0831');
  var img = DriveApp.getFileById('1qw2uy3cNxxxxxxxxxxxxxxxxxDZRES');
  var imgBlob = img.getBlob();
  sheet.insertImage(imgBlob, 9, 20);
}
Run Code Online (Sandbox Code Playgroud)

图像为 JPEG,276KB。图像大小为 173KB,此代码有效。是否可以插入大图像块?

google-sheets google-apps-script

1
推荐指数
1
解决办法
550
查看次数

标签 统计

google-apps-script ×1

google-sheets ×1