Chapter 2 Excel Object Model

Source: Internet
Author: User

1. Introduction to the Excel Object Model

Application: Microsoft. Office. InterOP. Excel. Application
Workbook: Microsoft. Office. InterOP. Excel. Workbook
Worksheet: Microsoft. Office. InterOP. Excel. Worksheet
Range: Microsoft. Office. InterOP. Excel. Range
Application: can be understood as ExcelProgramProcess. To use Excel, you must enable the EXCEL program. This program can be considered as an application.

Workbook: workbook. An Excel program can operate multiple Excel files at the same time. Each Excel file is actually a workbook. Of course, an applicatioin contains multiple workbooks.

Worksheet: a sheet. A Workbook can have multiple sheet pages.

Range: editing area. You can select an editing area. It is an abstraction of this area. It can be multiple cells, so cells [I, j] can be directly converted to range.

 

These are the most important objects.

Ii. Classic Hello world.

1. Create a project, office, and office 2010 workbook

2. Drag a button from the toolbar and place it on the sheet page.

3. Double-click this button to add events

4.Code:

Excel. Range RNG = globals. sheet1.range ["A1", missing];
RNG. value2 = "Hello World ";

5. Run the command to view the effect. Click A1 to check whether Hello world is displayed?

Globals is a global object reference,

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.