getting all spreadsheet values in one call - google apps script -


i'm trying spreadsheet values sheets in 1 call, 3 dimensional array. think way i'm using:

function threed_spreadsheet(){   var ss = spreadsheetapp.getactivespreadsheet();   var sheets = ss.getsheets();   var threed =[];   (var = 0; < sheets.length;i++){     threed.push(sheets[i].getdatarange().getvalues());   }   logger.log(threed); }  

is not effcient enough:

[16-01-26 23:11:38:336 pst] starting execution [16-01-26 23:11:38:341 pst] spreadsheetapp.getactivespreadsheet() [0 seconds] [16-01-26 23:11:38:362 pst] spreadsheet.getsheets() [0.02 seconds] [16-01-26 23:11:38:363 pst] spreadsheet.getsheets() [0 seconds] [16-01-26 23:11:38:410 pst] sheet.getdatarange() [0.046 seconds] [16-01-26 23:11:38:434 pst] range.getvalues() [0.023 seconds] [16-01-26 23:11:38:477 pst] sheet.getdatarange() [0.043 seconds] [16-01-26 23:11:38:501 pst] range.getvalues() [0.023 seconds] [16-01-26 23:11:38:503 pst] logger.log([[[[a, 1.0], [b, 2.0], [v, 5.0], [c, 5.0], [s, 3.0]], [[a, 3.0], [s, 5.0], [d, 4.0], [f, 2.0], [g, 1.0]]], []]) [0 seconds] [16-01-26 23:11:38:504 pst] execution succeeded [0.163 seconds total runtime] 

is familier more eficient way implement this?

you don't need loop.

function threed(){   var ss = spreadsheetapp.getactivespreadsheet();   var threed = ss.getactivesheet().getdatarange().getvalues()   logger.log(threed); }  

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -