I am using the Google API to fetch data from a Google Spreadsheet via Node.js. In Excel VBA it is possible to either use
Range("A3") or Cells(3,1)
to reference the range of the cell.
And for a multiple cell range it would be like:
Range(Cells(1,1), Cells(2,3))
instead of:
Range("A1:C2")
I could not find out how to do that via the Google Sheets API.
Tried following this guideline, but I think it's not the thing I need here: https://googlesheets4.tidyverse.org/articles/range-specification.html
My example code in Node.js looks like this:
async function getHelperData(cl){
const gsapi = google.sheets({version:'v4', auth: cl});
const opt = {
spreadsheetId: gs.gs_ID,
range: '_helperSheet!A1:C2'
};
let data = await gsapi.spreadsheets.values.get(opt);
let dataArray = data.data.values;
return dataArray;
};
Is it actually possible?