That is a new spreadsheet I created to reproduce the issue in a simpler way, but it happens to me with another one where I discovered the problem, those are normals Google spreadsheets, I did not modify any configuration, just the public permission. I guess it will happen with any spreadsheet I will use.
Note that the third link that you sent brings information from Sheet1 (AA,BB when it should be CC,DD) even when you specify Sheet2 in the URL.
I might be wrong but I think that the sheetName value is not being taken into account, take a look at this:
When you replace sheet with sheetname it happens the same as with the APP, it brings the Sheet1 and not Sheet2 data, it seems to me sheetname is not a valid parameter.
As far as I understand since I will only read the spreadsheet I do not need that part of the integration. Are you saying that error message is because the lack of the .json file?
Note that I'm not having issues accesing data due to permissions, it seems to be due to the sheetName paremeter, kindly check previous post with my tests.
"Note: If you are only going to read from the Google Sheets document, and not edit or write data to the document, you can skip the process of making a Service Account. The only requirement is that the Google Sheets document is shared such that anyone with the link can read the document."
I see your point on the .json file being required only for updates according to that doc.
From @TimAI2's tests, it looks like there is a requirement that ranges need gids instead of sheet names in range queries, and that might have slipped past testing of the Ai2 component.
Either that, or format=csv is incompatible with range requests.
I have used the spreadsheet component only with a ,json file, so this is new to me.
Google Sheets will usually return data on the first sheet if no other correct parameters are provided. It seems to ignore incorrect parameters instead of throwing an error.
My confusion above was with gviz, which does return data with the parameter sheet=Sheet2
As I have shown, and @ABG surmised, the spreadsheet component needs to have it's internal url adjusted, and for it to introduce the gid (fetched from the sheetName) as a separate parameter to the url.
Just tested with an aia project using json credentials, and the block does work! - which might explain why not working without credentials got missed in testing....
Thank you very much to all the people involved in my post, I've just confirmed that after implementing the .json file in my project I can access to Sheet2 using the same code, that made the difference and now it is working as expected.
TIMAI2: I wll analyze the web component suggestion too, thanks!.