Hi, I've been trying to work with the new Spreadsheet component. I followed the instructions for its setup (Google Sheets API Setup ), although the json file dowload was a bit different (there are differences in the 4th step).
I am testing the read / write functions, as it could be seen in this capture.
My configuration is as follows:
I shared my GoogleSheet:
And I wrote the properties and upload the json file:
I can't find my mistake, thanks in advance.
ABG
May 17, 2023, 8:46pm
2
CredentialsJSON should be the name of a .json file that you downloaded from the Google Console and uploaded into your app's Media folder.
ABG
May 17, 2023, 8:50pm
3
That space in the project name looks like trouble.
Be sure to have the Sheets Error catching event in your app for each sheet component, and have it Notify of its errors.
Just erased the space in the project name, it wasn't.
I had the .ErrorOcurred event block, but it doesn't show anything.
ABG
May 17, 2023, 9:00pm
6
What are you missing in your observations?
(I don't use the LogInfo Notifier. I use the popup with a button, so I don't miss it.)
Are you getting completion notifications?
ABG
May 17, 2023, 9:04pm
7
Here's a tutorial spread out on a thread, at
This sample is intended to show how to use Google Sheets aggregation functions like MAXIFS to summarize multirow log data into single line summaries.
This sample uses the New York City Marathon as a base, though it probably can't scale to the 53,000 runners.
It is based on three sheets:
Checkpoints, a list of locations each runner must cross on his route
Mileposts, a detail list of runner checkpoint timestamps
Runners, a master list of runners, with identifying bar codes and stats
Checkpoin…
with block samples.
ABG
May 17, 2023, 9:11pm
8
I have not seen sheet names with spaces in them used before with that component.
Try a new sheet with a name that does not have blanks in it.
Also, I have not seen Write Cells into non-existent cells yet.
Try some AddRow calls to build up some rows first before trying to hang cells in mid-air.
I generated my json file for Desktop APP:
When I selected "Android" to create the certificate, it asked me the Package Name and the SHA-1 certificate:
ABG
May 17, 2023, 9:17pm
10
Yeah, I tried my setup following that document. After your notification advice, now I can see the error: "ReadCell: Error reading credentials from stream, 'type' field no specified".
(I also erased the space in my sheet name).
ABG
May 17, 2023, 9:32pm
12
I would try a Read Sheet block for starters , to factor out individual cell problems.
ABG
May 17, 2023, 9:38pm
14
I assigned this thread to a MIT developer, in case they can recognize that internal error message.
Thanks, I hope they identify my error.
I tried the Google Sheets / Google Forms option, it worked very well, but this Spreadsheet blocks seem better, I'd really like to use them.
ABG
May 17, 2023, 11:21pm
16
In the meantime, try the ReadSheet and AddRow blocks, to narrow down the problem.
I'm not sure how much time I have to troubleshoot at the moment.
The first test project I would create would be a button and a label.
On the Button.Click event, call the ReadSheet block for your spreadsheet.
On the GotSheetData event, set label.Text = sheetData
On the ErrorOccurred event, set label.Text = errorMessage
That's the most basic app I can think of to test if you are connecting with your spreadsheet at all.
Also -- obviously this won't work for an empty spreadsheet, so it has to have some data.
If this fails to do anything at all, I would guess that the problem is in the credentials json somehow.
Similar error
"RetrieveSheet Error: Error reading credentials from stream, 'type' field no specified".
ABG
May 18, 2023, 2:35am
19
It's your Service Account key, according to that message:
You used an OAuth key instead of a Service Account key.
ABG
May 18, 2023, 2:49am
20
Here's a direct link to Google's doc for service account creation ...
1 Like
ABG
May 18, 2023, 3:11am
21
Here is what the JSON file might look like in Notepad++