To read different sheets from GoogleSheet, you need to slightly modify the parameters of the HTTP request.
Here is an example of a basic query:
Code |
---|
Connection.Get("/v4/spreadsheets/" + ID_GoogleSheet + "/values/A1:C7?key=[YOUR_API_KEY]", tempFile);
|
Here we read the data from the first sheet from the range A1:C7.
We just need to add to this parameter the name of the sheet from which we want to read data.
For example - 'Sheet 2'!A1:C7
In 1C, it will look like this:
Code |
---|
Connection.Get("/v4/spreadsheets/" + ID_GoogleSheet + "/values/'Sheet 2'!A1:C7?key=[YOUR_API_KEY]", tempFile);
|
That is, changing the parameter 'Sheet 2'! A1: C7 you can access different sheets of GoogleSheet.