Can we load Excel file in Office.js Add-in

有些话、适合烂在心里 提交于 2019-11-29 16:54:09

Add-ins are scoped to the document and are intended to extend the functionality of the Office application, not as a mechanism for opening documents themselves.

What you're describing is what WOPI is intended for. The WOPI protocol provides an interface between Office and the document storage.

While you can implement your own WOPI client, it isn't a trivial process. A far simpler approach is to leverage the user's OneDrive via Microsoft Graph. Files stored in OneDrive include a webUrl property. If you open this URL it will automatically open the file in the correct application (Excel, Word, etc).

If you are looking to open an workbook through a link/path, that is not possible yet in the web add-ins as the scope of the add-in is limited to the workbook. It is something in our roadmap to support cross workbook scenario. If you are looking to embed the workbook in a browser, Marc's response has the answer (works for OneDrive, SharePoint only).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!