i have array data in 2d and i want to print on googlesheet . The data look like this:
[['TIGER' 'ORANGE'], ['SNAKE' 'GREEN'], ['BEAR' 'BROWN'], ['FISH' 'YELLOW']]
and the expected output on the google sheet is: enter image description here
is there any idea how to do this? thanks for the help.
Try
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)
}