read an excel file from sharepoint using MS Graph API

Kompal Sithta 66 Reputation points
2023-04-06T06:00:34.47+00:00

I am trying to read an excel file present in a folder of a site in sharepoint using MS graph API and perform certain operations on the same. I am not able to get the content in human readable format. The end point url that I have been using so far is - https://graph.microsoft.com/v1.0/sites/{site-id}/drive/root:/{site-name}/{folder-name}/{file-name}:/content

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,823 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,849 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Gopinath Chennamadhavuni 2,431 Reputation points
    2023-04-06T06:24:37.3233333+00:00

    Hi @Kompal Sithta Thanks for reaching out. If you are looking to download file uploaded in document library referred as driveItem driveitem-get-content.

    GET /sites/{site-id}/drives/{drive-id}/root:/{path-relative-to-root}:/content   
    GET /sites/{site-id}/drives/{drive-id}/items/{item-id}/content  
    

    If you are looking to download file uploaded to a list item referred itemAttachment, currently Microsoft Graph doesn't have support for list item attachments, you can upvote feature requested submitted by other Graph users.
    Add support for SharePoint List Item Attachments in Graph
    Ability to attach files to list items using Graph API. Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  2. Aleksandar Salevski 0 Reputation points
    2023-11-28T14:01:05.97+00:00

    hi i have this problem,

    User's image

    User's image

    0 comments No comments