简体   繁体   中英

Is there a simple “hello world” sample Office 365 Excel add-in guide?

Is there a simple "hello world" sample for coding an Office 365 Excel add-in that I can follow and customize?

I am assuming that you would like to build an Excel add-in that can be run in Windows/Mac and Online. So you could use Yeoman generator to build "hello world" sample code easily. The Yeoman generator creates a Node.js project that can be managed with Visual Studio Code or any other editor, whereas Visual Studio creates a Visual Studio solution. Select the tab for the one you'd like to use and then follow the instructions to create your add-in and test it locally.

This article will walk you through the process of building an Excel Taskpane Add-in in Yeoman generator.

You could also explore API capability using Script Lab .

Script Lab is a useful tool for anyone who wants to learn how to develop Office Add-ins using the Office JavaScript API in Excel, Word, or PowerPoint. It provides IntelliSense so you can see what's available and is built on the Monaco framework, the same framework used by Visual Studio Code. Through Script Lab, you can access a library of samples to quickly try out features or you can use a sample as the starting point for your own code. You can even use Script Lab to try preview APIs.

Well it depends on what you mean by an Excel add-in I guess. There are a lot of options here.

If you're talking about a simple add-in written in VBA, which doesn't require any additional tools to get started, there are lots of tutorials available online.

You could take a look at this simple getting started tutorial:

If you want to know more about there is to developing office (excel) add-ins i'd encourage you to take a look at the developer docs from microsoft:

The nice thing about this approach is that it's designed to be cross-platform and enables you to create add-ins by using web dev technology. If you're more interested in using visual studio and VB.NET / C# I'd start by exploring the VSTO Add-ins route. Start at the docs or use google for getting started tutorials yourself. The VSTO docs can be found here:

There are three common ways to create an Excel 365 JavaScript Add-in:

(1) You could use the Yeoman Generator (with Visual Studio Code)

(2) You could use the Office Templates (with Visual Studio 2019)

(3) You could use NPM and Webpack (with Notepad)

You can find simple "Hello World" examples of all three here:

https://bettersolutions.com/javascript/excel-api/index.htm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM