Day3 Visual Studio 開發及部屬第一個Excel Add-ins
第一個Office 365 Plugins開發
這裡已經講得很清楚,就不再重複:Build an Excel task pane add-in
基本上就是兩個東西 manifest與web app.
我是使用Visual Sutido開發,你需要安裝Office套件(如果一開始沒安裝,在Visual Studio Installer可以安裝)。
Publish Office 365 Plugins Project
這裡也講得很清楚:Publish your add-in using Visual Studio
而Office 365 Plugins你會需要Publish兩個東西,一個是web project,一個是manifest。
Visual Studio Publish的操作可以參考。
Deploy and Publish Office 365 Plugins
可以參考這裡,我是使用sideload方式(因為公司限制,無法使用microsoft 365 developer的sandbox,很多種部屬方法也有限制,所以我是使用sideload的web方法測試,測試起來也方便)。
[Manually sideload an add-in to Office on the web] (內容擷取自) This method doesn’t use the command line and can be accomplished using commands only within the host application (such as Excel).
-
Open Office on the web. Open a document in Excel, OneNote, PowerPoint, or Word.
-
Select Home > Add-ins, then select More Add-ins.
-
On the Office Add-ins dialog, select the MY ADD-INS tab, choose Manage My Add-ins, and then Upload My Add-in.
-
Browse to the add-in manifest file, and then select Upload.
-
Verify that your add-in is installed. For example, if it has an add-in command, it should appear on either the ribbon or the context menu. If it’s a task pane add-in that has no add-in commands, the task pane should appear. 測試結果,成功!
IIS架設
關於IIS的架設可以參考:How to install IIS 這是Web結果,記得IIS架設時要使用SSL,否則將無法使用Excel plugin。 Requirements for running Office Add-ins
[註]IIS SSL設定
- SSL Setting調整成如此
- url binding到443並設定ssl憑證
Debug Office 365
可以參考Debug add-ins using developer tools in Microsoft Edge (Chromium-based),基本上跟一般的Web debug一樣。
Reference: https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-jquery?tabs=visualstudio Can i publish Office add-in without having a corporate/company?
blog comments powered by Disqus