Excel Development tour: excel tour

Source: Internet
Author: User

Excel Development tour: excel tour

Development Environment: Microsoft Visual Studio 2015, Office 2013

Development language: C #


1. Create a project: Create a project in the file, and select the office ins Excel 2013 and 2016 VSTO ins,


Go to the ThisAddIn. cs file and we will find that two methods have been automatically generated:


ThisAddIn_Startup (): excel loads this method before calling the plug-in.

ThisAddIn_Shutdown (): called when excel is closed.

The specific usage will be detailed in the subsequent use process.


2. Select the project you just created, and right-click a to add a new item)



3. After adding the functional area designer, you can add some buttons and other tools from the Toolbox on the right. Three buttons are simply added.

4. Basically, a simple "Excel secondary development" project is created here. Click "Run (F5)" to start the project. As you can see, the function designer we just edited is loaded into excel.

Note: if an error occurs during the running process, the following error occurs during the next running:"Ask if we want to disable the plug-in we just wrote"Select"No"That's all.

If we accidentally select "yes", it doesn't matter. Open the Excel file, select "file à option à add-on", and find "manage". In the drop-down list, find the Disabled Project, select "go to (G)", select the disabled plug-in, and click "enable ". This is not complete yet. You also need to select "COM add-on" from the "manage" drop-down list, select the plug-in you just developed, and click "OK.


Now, let's share today. Continue!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.