Hello Dear Community ,
I have a DataTable for Reporting, I wish to write it in my Gsheet sheet. It is a simple datatable with 2 columns. Yet, I have an Exception while using “Write Range” GSuite Activities for Gsheet. Can you help me please ?
Here is my issue :
When I wish to write the DataTable to the wanted sheet , we get the following message error : Exception: Invalid data: Requested writing within range in [sheetname] but tried writing to column B  Source: Google.Apis
As you can see in the bellow image :
I tried to :
- Write DataTable into CSV file = All OK
- Write DataTable as string in log with OUtput DataTable = All OK
- Write in theDataTable in the same Gsheet cell by cell, using For each row and write cell instead of Write Range = All OK
Does any of you already get this error ?
Thank you in advance for you help !
In case any unfortunate soul stumbles on this same issue in the future …
We encountered this EXACT same issue/error message. It turns out the problem was related to the name of the worksheet. The Google API does not like some special character(s) in the Worksheet name. It will let you create the worksheet with special characters but then will throw an error (i.e. the exact error show in this thread) when you try to write to a cell in that worksheet.
We did not troubleshoot to figure out exactly which special characters caused the problem, but we were using a date/time value with colons and slashes. Removing both resolved our issue.
Lastly, for more info you can google the same error without ‘uipath’ and you can see where other applications have a similar issue when using the google api. For example, THIS Stack Overflow post.
Addendum to Stuk’s post.
Another work around is to use a temporary name like “temp” or “inProcess” when you create and work with the sheet. Afterwards, you can “Rename Sheet” and use the full, normal character set.
Thanks @fred.bullmer and @stuk !
I think last year we finally used another activity instead.
It’s great to hear from other people having the same error and finding solution and work around !
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.