Forum Discussion

320236's avatar
320236
Copper Contributor
Aug 08, 2024

OneDrvice Graph API for to read columns from Excel

Hi All,

 

We want to read 1 to10 columns from one drive excel file using Microsoft graph API.

 

Can you please let me know which endpoint of Microsoft graph API can help ?

1 Reply

  • if you just want to read 10 columns its
    'https://graph.microsoft.com/v1.0/drives/{drive-id}/items/{item-id}/workbook/worksheets/{worksheet-id}/usedrange'

    i think there is one where you specify the range, but i believe you need to specify the columns and rows... (i ended up using used range)

    it will get the "used range" so all lines and columns used. from there you can pick only what you want. item-id is your file id and worksheet-id is your sheet in the file (I believe for worksheet you can use the name "sheet1" or "expense" you dont need the id.

Resources