Skip to content

Instantly share code, notes, and snippets.

@Max-Makhrov
Created November 2, 2017 14:49
Show Gist options
  • Save Max-Makhrov/e5d85444384e79e220150e9f9bd3761b to your computer and use it in GitHub Desktop.
Save Max-Makhrov/e5d85444384e79e220150e9f9bd3761b to your computer and use it in GitHub Desktop.
Get Sheets data into array
function getDataFromSheet()
{
var sheet = SpreadsheetApp.getActiveSheet(); // get active sheet
var range = sheet.getDataRange(); // get range object containing data
var data = range.getValues(); // write range data into array called data
Logger.log(data); // Log Data. To see the result run function and press <Ctrl + Enter>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment