it's known that in order to get the values from rows-columns in the Google sheets API, the format is something like this:
gapi.client.sheets.spreadsheets.values.get({
spreadsheetId: id,
range: "myData!A1:E"
}).then(res => {
console.log(res.result);
}, err => console.log(err));
Notice the "range" has to be within specific parameters, but how do I simply get the values in the max range? Is there some shorthand like "myData!Min:Max" ? I know that you can make another request to get the max row and column length:
sheets.spreadsheets.get({
spreadsheetId: id,
ranges: [],
auth: something
}, (err, resp) => {
var sheetOne = resp.data.sheets[0];
console.log(sheetOne.properties.gridProperties); // { rowCount: 1024, columnCount: 7 } (for example)
})
and then once I have that I can theoretically automatically generate the range string with a number-to-letter switching-system to get the column letter names or something like that, and make another request to get the max columns, but first of all:
- It might be complicated to make a function that returns a letter-format range from just number maxes
- even so, I would like to get only the range that have non-empty values in it; if I have a 1000 row spreadsheet but only using the first 20 rows and columns, then I Want to automatically limit the range to the actual values.
Any way to do this with the API???