Thank you, Anders.
I only needed the variable type in which credential is parsed to read/write.
I learned that secret pass should be exchanged for the tokens, but I did not know it was possible inside Grasshopper. Your method authorizeSheetCredentials would be really helpful. I cannot wait to try this out.
Note that the exact same code will also work in e.g. Revit/Dynamo since itβs just straight up IronPython. As I recall it was quite the implementation challenge getting this working, as I could find zero precedence for this kind of coding in IronPython. In retrospect, doing it in C# would likely have been simpler, but hey here we are
thanks for sharing this. I feel I got it almost to work. I made a simple test to read from one sheet and write the same to another, but the output of data is in this form:
List[IList[object]]([List[object]([β555β, β5555β]), List[object]([β556777β, β444β]), List[object]([β7777β, β89β])])
Hi Anders,
This seems to be hot topic these days, I did run your script and it works (read sheets), with one exception, it will not update data after i change them in spreadsheet.
i get new values in grasshopper only when i change SheetRange. But as soon as i change it back to original Range, i recieve old values. The restart of rhino usually does not help, Have you got similar issues before?
to illustrate:
Google sheet : Row1[1,2,3,4,5]
Grasshopper : Sheet2!A1:E1 -> [1,2,3,4,5]
Google sheet : Row1[1,2,3,4,XX]
Grasshopper : Sheet2!A1:E1 -> [1,2,3,4,5] - no update
Grasshopper : Sheet2!A1:X2 -> [1,2,3,4,XX] - update
Grasshopper : Sheet2!A1:E1 -> [1,2,3,4,5] - back to old values
@Gijs@AndersDeleuran Hi any of you experince, that data does not update in Grashopper as i described over? it seem s for me that my issue is on Google side rather than in GH?
thanks
Update: it seems to update using BatchGet instead of Get
Sorry missed your post @Vladimir_Ondejcik. Iβve not experienced this behaviour, but would agree that it does sound like an issue on the Google side (perhaps related to how the credential/client configuration is defined ).
@Vladimir_Ondejcik I havenβt used it yet extensively. Only did a quick test to get the basics working for planned later use but I will try and report back.
Is there a way to make the autorise component automatically authorise when starting a gh script? As every time I close down gh script open back up, it requires me to go into authorise component click test and ok for it to work.