I have been using the GSuite Application Scope and its related activities for while without any issues. Suddenly for any of the new projects that I use this, I keep getting an error. The old ones using the GSuite App still works fine

Error: {
“message”: “UiPath.GSuite.Exceptions.GSuiteException: The request is not as expected by Google API.\r\n —> UiPath.GSuite.Exceptions.GSuiteInternalException: The request is not as expected by Google API.\r\n —> The service sheets has thrown an exception: Google.GoogleApiException: Range (‘TC2’!TC2) exceeds grid limits. Max rows: 1000, max columns: 27 [400]\r\n at Google.Apis.Requests.ClientServiceRequest1.ParseResponse(HttpResponseMessage response) in C:\\Apiary\\2021-09-08.15-52-39\\Src\\Support\\Google.Apis\\Requests\\ClientServiceRequest.cs:line 258\r\n at Google.Apis.Requests.ClientServiceRequest1.ExecuteAsync(CancellationToken cancellationToken) in C:\Apiary\2021-09-08.15-52-39\Src\Support\Google.Apis\Requests\ClientServiceRequest.cs:line 219\r\n at UiPath.GSuite.Sheets.Services.SheetsServiceWrapper.ExecuteAsync[TResponse](SheetsBaseServiceRequest1 request, CancellationToken cancellationToken)\r\n at UiPath.GSuite.Sheets.Extensions.SheetsServiceExtensions.GetValuesFromRangeAsync(ISheetsServiceWrapper service, String spreadsheetId, String a1RangeNotation, MajorDimensionEnum majorDimension, Nullable1 readAs, CancellationToken cancellationToken)\r\n at UiPath.GSuite.Sheets.Extensions.SheetsServiceExtensions.ReadRangeAsync[T](ISheetsServiceWrapper service, String spreadsheetId, RangeMetadata range, ValuesType readAs, Boolean hasHeaders, CancellationToken cancellationToken)\r\n at UiPath.GSuite.Sheets.Services.SheetsServiceProxy.<>c__DisplayClass33_01.<<ReadRangeAsync>b__0>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at UiPath.Shared.TelemetryService.NullTelemetryService.OperationContextAsync(Func2 method)\r\n at UiPath.GSuite.Sheets.Services.SheetsServiceProxy.ReadRangeAsync[T](ReadRangeRequest readRangeRequest, CancellationToken cancellationToken)\r\n at UiPath.GSuite.Activities.ReadRangeConnections`1.SafeExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n at UiPath.GSuite.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n — End of inner exception stack trace —\r\n — End of inner exception stack trace —\r\n at UiPath.GSuite.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at UiPath.GSuite.Activities.GoogleBaseClientActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)”,

}

The error “Range (‘TC2’!TC2) exceeds grid limits. Max rows: 1000, max columns: 27 [400]” indicates that your program is trying to use a cell reference (‘TC2’!TC2) that exceeds the size of the Google Sheets document.

Google Sheets have a limit of 1000 rows by 27 columns, so if you’re trying to refer to a range that’s outside of these limits, an error will occur.

The solution is to adjust your range so it fits within the size of the Google Sheets document. For example, instead of trying to read the range ‘TC2’!TC2, you might need to refer to a range within the first 27 columns and 1000 rows. More specifically, Google Sheets allows columns till ‘AA’, so referencing anything beyond that would throw an exception.

Also, ensure that the referenced sheet ‘TC2’ exists in the Google Sheets document you’re trying to access. A similar error could occur if the program tries to access a sheet that doesn’t exist.

1 Like