如何使用 google 脚本在 google sheet 中打印二维数组?

How to print 2d array in google sheet using google script?

我有二维数组数据,我想在 googlesheet 上打印。数据如下所示:

[['TIGER' 'ORANGE'], ['SNAKE' 'GREEN'], ['BEAR' 'BROWN'], ['FISH' 'YELLOW']]

google sheet 上的预期输出是: enter image description here

有什么办法吗?感谢您的帮助。

尝试

function insertData(){
  var data = [['TIGER','ORANGE'], ['SNAKE','GREEN'], ['BEAR','BROWN'], ['FISH','YELLOW']]
  var sh=SpreadsheetApp.getActiveSheet()
  sh.getRange(1,1,data.length,data[0].length).setValues(data)
}