简体   繁体   中英

MS Graph Update/Set Excel value in a cell

I haven't found any example to update/insert a value in one cell of an specific worksheet with Microsoft Graph API.

Is this in general possible?

Kind regards, Martin

Yes, this is possible with Microsoft Graph. If the cell is in a 'well-known' address, you can PATCH the cell values by making a PATCH request to ~/workbook/worksheets/{id|name}/range(address='<address>') .

See range update documentation for additional detail.

It is possible, using single cell reference. Send PATCH request to (for example) one drive workbook:

 https://graph.microsoft.com/v1.0/me/drive/items/{id}/workbook/worksheets('one_of_your_worksheet_name')/cell(row=0,column=0)

Request body example:

{
 "values": [ ["I am cell A:1"] ],
 "valueTypes": [ ["String"]]
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM