簡體   English   中英

如何在Sharepoint Framework(SPFx)應用程序中使用Excel Rest API訪問存儲在Sharepoint聯機文檔庫中的Excel數據?

[英]How to access Excel Data stored in Sharepoint Online Document Library using Excel Rest API in a Sharepoint Framework (SPFx) app?

我有一個使用基因敲除JS的Sharepoint Framework項目(SPFx),其中該應用程序將嘗試使用Excel Rest API從存儲在Sharepoint在線站點的sharepoint文檔庫中的Excel文件中讀取數據。

我遇到了一些文檔,但是沒有給我一個具體的工作示例。

https://docs.microsoft.com/zh-cn/sharepoint/dev/general-development/excel-services-rest-api

https://docs.microsoft.com/zh-cn/sharepoint/dev/general-development/requesting-excel-workbook-data-from-sharepoint-server-using-odata

我無法使用此URL獲取文檔列表。

http:///_vti_bin/ExcelRest.aspx/Documents/Book1.xlsx

而且我認為我需要創建一些身份驗證方法,以便應用程序用戶可以在閱讀文檔之前訪問該文檔。

我以前沒有在Sharepoint Framework(SPFx)應用程序中使用Excel Rest API和Microsoft Graph。

誰可以幫我這個事? 我想看到一個完整的工作示例,該示例在SharePoint在線文檔庫中讀取Excel文件。

對於SharePoint Online,您需要使用Microsoft graph api從SharePoint Online訪問excel文件。

樣本端點:

https://graph.microsoft.com/v1.0/sites/domain.sharepoint.com,id,id/drives/drive id/items/item id/workbook

您可以檢查線程以獲取更多詳細信息。

http://blog.atwork.at/post/2017/12/29/Access-files-in-OneDrive-或-SharePoint-with-Microsoft-Graph-and-the-Excel-API

使用GraphHttpClient調用Microsoft Graph

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM