Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 谷歌应用程序脚本-如何将表格插入现有表格单元格_Google Apps Script - Fatal编程技术网

Google apps script 谷歌应用程序脚本-如何将表格插入现有表格单元格

Google apps script 谷歌应用程序脚本-如何将表格插入现有表格单元格,google-apps-script,Google Apps Script,在下面的代码中,注释代码运行正常,但同一插入表出现错误服务不可用:Docs function createTbl(){ var body = DocumentApp.getActiveDocument().getBody(); // Create a two-dimensional array containing the cell contents. var cells = [ ['Row 1, Cell 1', 'Row 1, Cell 2'], ['Row 2,

在下面的代码中,注释代码运行正常,但同一插入表出现错误服务不可用:Docs

function createTbl(){
  var body = DocumentApp.getActiveDocument().getBody();

  // Create a two-dimensional array containing the cell contents.
  var cells = [
   ['Row 1, Cell 1', 'Row 1, Cell 2'],
   ['Row 2, Cell 1', 'Row 2, Cell 2']
  ];

  var tbl = body.appendTable(cells);
  var row = tbl.getChild(0);
  var cell = row.getChild(0);

  //cell.insertParagraph(0,'Hello Wrold!'));
  cell.insertTable(0,cells)  
}

这是应用程序脚本中的一个已知错误,每当脚本试图向TableCell添加子表时,就会弹出该错误