On Excel Development (II.) Excel menu system

Source: Internet
Author: User
Tags visual studio

Before you start Excel development, you need to put the shelves together. The most straightforward is the menu in Excel, and he shows the user intuitively what our plug-ins are capable of. After the menu comes out, we can implement the events and functions inside. There are two forms of Excel menu, one is Excel 2003 and the previous traditional menu style, one is Excel 2007 and after the Ribbon menu. This article first explains the creation of menus in Excel 2007, including the Visual Studio visual Design menu, the ribbonxml configuration of menus, and then how to create a custom menu in Excel 2003. Finally, we demonstrate how to use the Sharedaddin technology to combine the two, that is, to display the original menu style in version 2003 and to dynamically load the Ribbon menu in Version 2003 to achieve version compatibility.

An Excel ribbon menu and Ribbon XML file

To demonstrate the creation of a menu, we first create an VSTO program, as shown in VS to create an Excel add-in:

Next, add the item and add a ribbon menu:

Before creating a menu, you need to be clear about what modules our plug-ins have. In order to demonstrate how to create a menu and the function points behind it, our plug-in intends to do four functional points. The first is the financial module, including from some open financial APIs such as the Sina Financial API, Yahoo API to obtain real-time or historical market data; Map modules, including map display, address retrieval, thematic mapping, weather modules, getting weather, weather-guaranteed tables, system modules, including login, help, about modules, etc. Once you have identified the functional points, you are ready to start creating menus.

After adding the Ribbon menu, you can open the Toolbox and start designing it, as shown in the following figure. The functions and Design essentials of each menu item are described below.

Basic controls

Related articles:

On the development of Excel (1) Excel Development Overview: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/net/201312/39219.htm

2.1 Tab Control

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.