1

Started getting below error randomly. while same code works fine if I stop my service and sun again. but after 1 days or two its start giving this error. I have scheduled a job to run after every 15 minutes where based on some condition it update the K column value.

A quick help is highly appreciated.

Error message : Google.Apis.Requests.RequestError Range (Sheet1!K1254) exceeds grid limits. Max rows: 804, max columns: 25 [400] Errors [ Message[Range (Sheet1!K1254) exceeds grid limits. Max rows: 804, max columns: 25] Location[ - ] Reason[badRequest] Domain[global] ]

Edit1: code which I am using to update the code:

private static async Task UpdateValue(SpreadsheetsResource.ValuesResource valuesResource,string updatedvalue, string emailaddr)
        {
            var valueRange = new ValueRange { Values = new List<IList<object>> { new List<object> { updatedvalue } } };
            var update = valuesResource.Update(valueRange, SpreadsheetId, WriteRange);
            update.ValueInputOption = SpreadsheetsResource.ValuesResource.UpdateRequest.ValueInputOptionEnum.RAW;
            var response = await update.ExecuteAsync();
            Console.WriteLine($"Updated Licenses Status for : { response.UpdatedRows} " + emailaddr );
        }
Vijai Maurya
  • 101
  • 1
  • 1
  • 8
  • I have updated the Google API DLL and now below error started coming: Error message : The service sheets has thrown an exception. HttpStatusCode is BadRequest. Range (Sheet1!K1254) exceeds grid limits. Max rows: 804, max columns: 25 – Vijai Maurya Apr 19 '22 at 04:17
  • The error is coming when I am running the application from the Prod server but when debugging the code from my local PC its working fine. Seems issue from googleAPI end for requests limit. any help anyone ? – Vijai Maurya Apr 19 '22 at 04:35
  • Please share an example or copy of your spreadsheet, remove any sensitive data if any. And also the code that you are using for us to be able to replicate your issue and so we can provide or suggest solutions. See: https://stackoverflow.com/help/minimal-reproducible-example – Logan Apr 19 '22 at 07:17
  • Added the source code which I am using. Google sheet I am using is having below columns FirstName LastName Email Company Title YearswithCompany RequestedBy BestPhone CreateDateTime UserIPAddress LicenseStatus I am updating LicenseStatus column value. Currently I am google sheet have 642 rows. Above error I am getting randomly, from couple of days I did not getting any issue. – Vijai Maurya Apr 24 '22 at 06:16

0 Answers0