Forum Discussion
emiagin
May 29, 2023Copper Contributor
Import data from google sheet using api key
Hi! I tried to connected my google sheet and excel sheet. The problem is in permitions. My google sheet have not viewed by anyone and i should use some authentication. I choose api key and created th...
emiagin
May 30, 2023Copper Contributor
peiyezhu i tried to use this request using api key:
OData.Feed("https://sheets.googleapis.com/v4/spreadsheets/<sheet-id>?ranges='Common'!A1%3AC5", null, [Implementation="2.0", ApiKeyName="API_KEY_EXCEL"])But receive an error:
Expression.Error: Access to the resource is forbidden.This request is works in https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get try method window, but needs api key + oauth. I think i need to connect by google oauth in excel?
peiyezhu
May 30, 2023Bronze Contributor
https://developers.google.com/sheets/api/reference/rest?hl=ru
I know oData is a restful api but I can not open url like above from google.com because of the network forbidden.
https://techcommunity.microsoft.com/t5/excel/post-api/td-p/3762681
Here is sample api service without key.
you can try it with webservice formular or oData to test.
http://e.anyoupin.cn/?s2=select%20%20*%20from%20Second_to_last_value_from_table_with_condition
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get
if possible,post the contents of above url,we can do research together.
I know oData is a restful api but I can not open url like above from google.com because of the network forbidden.
https://techcommunity.microsoft.com/t5/excel/post-api/td-p/3762681
Here is sample api service without key.
you can try it with webservice formular or oData to test.
http://e.anyoupin.cn/?s2=select%20%20*%20from%20Second_to_last_value_from_table_with_condition
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get
if possible,post the contents of above url,we can do research together.