第一個Office 365 Plugins開發

這裡已經講得很清楚,就不再重複:Build an Excel task pane add-in

基本上就是兩個東西 manifest與web app. image

我是使用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。 image

Visual Studio Publish的操作可以參考

Deploy and Publish Office 365 Plugins

可以參考這裡,我是使用sideload方式(因為公司限制,無法使用microsoft 365 developer的sandbox,很多種部屬方法也有限制,所以我是使用sideload的web方法測試,測試起來也方便)。 image

Test Office Add-ins image

[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).

  1. Open Office on the web. Open a document in Excel, OneNote, PowerPoint, or Word.

  2. Select Home > Add-ins, then select More Add-ins.

  3. On the Office Add-ins dialog, select the MY ADD-INS tab, choose Manage My Add-ins, and then Upload My Add-in. image

  4. Browse to the add-in manifest file, and then select Upload. image

  5. 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. 測試結果,成功! image

IIS架設

關於IIS的架設可以參考:How to install IIS 這是Web結果,記得IIS架設時要使用SSL,否則將無法使用Excel plugin。 image Requirements for running Office Add-ins image

[註]IIS SSL設定

  1. SSL Setting調整成如此 image
  2. url binding到443並設定ssl憑證 image

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

Published

13 March 2024

Categories

Tags