Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day3 Visual Studio 開發及部屬第一個Excel Add-ins #305

Closed
maxchen989 opened this issue Mar 13, 2024 · 0 comments
Closed

Day3 Visual Studio 開發及部屬第一個Excel Add-ins #305

maxchen989 opened this issue Mar 13, 2024 · 0 comments

Comments

@maxchen989
Copy link
Owner

maxchen989 commented Mar 13, 2024

第一個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?

@maxchen989 maxchen989 changed the title Day3 Visual Studio 開發 Excel Add-ins Day3 Visual Studio 開發及部屬第一個Excel Add-ins Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant