Can't get the list of worksheets in a workbook stored in sharepoint using microsoft-graph-api

215 Views Asked by At

I'm not able to get the list of worksheets in a workbook for some reason. this might be related to my other issue which is can't add records in a excel table

this is the full error message that is returned to me when calling this endpoint: https://graph.microsoft.com/v1.0/sites/OurSiteId/drives/OurDriveId/Items/OurFileId/workbook/worksheets

{
    "error": {
        "code": "MaxRequestDurationExceeded",
        "message": "We're sorry. We couldn't finish what you asked us to do because it was taking too long.",
        "innerError": {
            "code": "gatewayTimeoutUncategorized",
            "message": "The service wasn't able to complete the request within the time limit.",
            "innerError": {
                "code": "MaxRequestDurationExceeded",
                "message": "We're sorry. We couldn't finish what you asked us to do because it was taking too long."
            },
            "date": "2020-11-24T12:55:28",
            "request-id": "c28bc40e-4ba6-4606-8c5a-ea0663cafa29",
            "client-request-id": "c28bc40e-4ba6-4606-8c5a-ea0663cafa29"
        }
    }
}

there appears to be a file size limit of a workbook as described here file limit in sharepoint but still, the file that I am working is only 40mb (limit is 50mb) and I am already encountering access issues on the file.

The file that I am working already has more than a million records, is that possibly the cause of the issue?

1

There are 1 best solutions below

0
On

It may be the case, but just make sure you can open the excel file in your browser/onedrive and you can write the info manually. As a rule of thumb make sure that it doesn't contain any styles, any empty cells/columns, any macro's etc