Forum Discussion

uthpala1000's avatar
uthpala1000
Copper Contributor
Dec 09, 2018

How to embed excel files in onedrive for business

One drive business is not supporting embedding excel files. but i have a strong requirement to do so. in https://support.office.com/en-us/article/Embed-your-Excel-workbook-on-your-web-page-or-blog-from-SharePoint-or-OneDrive-for-Business-7af74ce6-e8a0-48ac-ba3b-a1dd627b7773example they explain how to do it manually using the classic one drive interface. is there anyway i can do it through coding ?

graph client snippets this is the line to get a share link

Permission permission = await graphClient.Me.Drive.Items[id].CreateLink("view", "organization").Request().PostAsync();

but only view and edit is available. i tried adding " &action=embedview" to the url end but it also not working. anyone have any idea how to achive this ?

and also how to generate the preview link from this

Permission permission = await graphClient.Me.Drive.Items[id].Preview("",100).Request().PostAsync();

this says cannot convert item preview info to permission.

Thank you in advance

No RepliesBe the first to reply

Resources