src/sheets.js
async function getRanges(
  auth,
  spreadsheetId,
  ranges,
  fields = 'properties.title,sheets.properties,sheets.data(rowData.values.effectiveValue,rowData.values.formattedValue,rowData.values.effectiveFormat.numberFormat)'
) {
  var sheets = google.sheets('v4');
  const response = await Q.ninvoke(sheets.spreadsheets, 'get', {
    auth: auth,
    spreadsheetId: spreadsheetId,
    // https://developers.google.com/sheets/guides/concepts, https://developers.google.com/sheets/samples/sheet
    fields: fields,
    includeGridData: true,
    ranges: ranges
  });
  const spreadsheet = response.data;
  return spreadsheet;
}
async function getRanges(
  auth,
  spreadsheetId,
  ranges,
  fields = 'properties.title,sheets.properties,sheets.data(rowData.values.effectiveValue,rowData.values.formattedValue,rowData.values.effectiveFormat.numberFormat)'
) {
  var sheets = google.sheets('v4');
  const response = await Q.ninvoke(sheets.spreadsheets, 'get', {
    auth: auth,
    spreadsheetId: spreadsheetId,
    // https://developers.google.com/sheets/guides/concepts, https://developers.google.com/sheets/samples/sheet
    fields: fields,
    includeGridData: true,
    ranges: ranges
  });
  const spreadsheet = response.data;
  return spreadsheet;
}
async function getRanges ( auth , spreadsheetId , ranges , fields = 'properties.title,sheets.properties,sheets.data(rowData.values.effectiveValue,rowData.values.formattedValue,rowData.values.effectiveFormat.numberFormat)' ) { var sheets = google . sheets ( 'v4' ) ; const response = await Q . ninvoke ( sheets . spreadsheets , 'get' , { auth : auth , spreadsheetId : spreadsheetId , // https://developers.google.com/sheets/guides/concepts, https://developers.google.com/sheets/samples/sheet fields : fields , includeGridData : true , ranges : ranges } ) ; const spreadsheet = response . data ; return spreadsheet ; }
Utility function to get a range from a spreadsheet
Utility function to get a range from a spreadsheet