Perspective on the Excel Object Model

To put the Excel object model in some perspective, Table 15-1 gives some statistics on various Microsoft object models for Office 97 (the numbers are somewhat larger for later versions of Office).

Table 15-1. Some Object Model Statistics for Office 97

Application

Objects

Properties

Methods

Enums

Constants

Access 8

51

1596

532

31

485

Binder 8

4

37

15

4

11

DAO 3.5

37

235

174

26

185

Excel 8

192

3245

1716

152

1266

Forms 2

64

588

352

42

191

Graph 8

44

1120

234

58

447

Office 97

40

615

209

78

801

Outlook 8

42

1568

534

34

154

PowerPoint 8

110

1197

322

53

370

Word 8

188

2300

837

192

1969

For reference, Table 15-2 shows all nonhidden objects in the Excel XP object model, along with the number of children for each object.

Table 15-2. Excel 10 objects and their child counts

AddIn (1)

FillFormat (1)

Protection (1)

AddIns (2)

Filter (1)

PublishObject (1)

Adjustments (0)

Filters (2)

PublishObjects (2)

AllowEditRange (2)

Floor (4)

QueryTable (3)

AllowEditRanges (1)

Font (1)

QueryTables (2)

Application (32)

FormatCondition (4)

Range (22)

Areas (2)

FormatConditions (2)

RecentFile (2)

AutoCorrect (1)

FreeformBuilder (2)

RecentFiles (2)

AutoFilter (3)

Graphic (1)

RoutingSlip (1)

AutoRecover (1)

Gridlines (2)

RTD (0)

Axes (2)

GroupShapes(3)

Scenario (2)

Axis (6)

HiLoLines (2)

Scenarios (2)

AxisTitle (6)

HPageBreak (3)

Series (6)

Border (1)

HPageBreaks (2)

SeriesCollection (2)

Borders (2)

Hyperlink (3)

SeriesLines (2)

CalculatedFields (2)

Hyperlinks (2)

ShadowFormat (1)

Calculatedltems (2)

Interior (1)

Shape (22)

CalculatedMember (1)

IRtdServer (0)

ShapeNode (0)

CalculatedMembers (2)

IRTDUpdateEvent (0)

ShapeNodes (1)

CalloutFormat (0)

LeaderLines (2)

ShapeRange (17)

CellFormat (4)

Legend (5)

Shapes (4)

Characters (2)

LegendEntries (2)

Sheets (3)

Chart (16)

LegendEntry (3)

SmartTag (4)

ChartArea (5)

LegendKey (4)

SmartTagAction (1)

ChartColorFormat (1)

LineFormat (1)

SmartTagActions (2)

ChartFillFormat (2)

LinkFormat (1)

SmartTagOptions (1)

ChartGroup (7)

Mailer (1)

SmartTagRecognizer (1)

ChartGroups (2)

Name (2)

SmartTagRecognizers (2)

ChartObject (6)

Names (2)

SmartTags (2)

ChartObjects (6)

ODBCError (1)

SoundNote (1)

Charts (4)

ODBCErrors (2)

Speech (0)

ChartTitle (6)

OLEDBError (1)

SpellingOptions (0)

ColorFormat (0)

OLEDBErrors (2)

Style (4)

Comment (3)

OLEFormat (1)

Styles (2)

Comments (2)

OLEObject (5)

Tab (1)

ConnectorFormat (2)

OLEObjects (6)

TextEffectFormat (0)

ControlFormat (1)

Outline (1)

TextFrame (2)

Corners (1)

PageSetup (2)

ThreeDFormat (1)

CubeField (3)

Pane (2)

TickLabels (2)

CubeFields (2)

Panes (2)

TreeviewControl (1)

CustomProperties (2)

Parameter (2)

Trendline (3)

CustomProperty (1)

Parameters (2)

Trendlines (2)

CustomView (1)

Phonetic (2)

UpBars (4)

CustomViews (2)

Phonetics (2)

UsedObjects (1)

DataLabel (6)

PictureFormat (0)

UserAccess (0)

DataLabels (6)

PivotCache (2)

UserAccessList (1)

DataTable (3)

PivotCaches (2)

Validation (1)

DefaultWebOptions (1)

PivotCell (6)

VPageBreak (3)

Diagram (2)

PivotField (5)

VPageBreaks (2)

DiagramNode (3)

PivotFields (2)

Walls (4)

DiagramNodeChildren (1)

PivotFormula (1)

Watch (1)

DiagramNodes (1)

PivotFormulas (2)

Watches (2)

Dialog (1)

PivotItem (4)

WebOptions (1)

Dialogs (2)

PivotItemList (2)

Window (7)

DisplayUnitLabel (6)

PivotItems (2)

Windows (2)

DownBars (4)

PivotLayout (4)

Workbook (14)

DropLines (2)

PivotTable (8)

Workbooks (2)

Error (1)

PivotTables (2)

Worksheet (17)

ErrorBars (2)

PlotArea (4)

WorksheetFunction (1)

ErrorCheckingOptions (1)

Point (5)

Worksheets (3)

Errors (2)

Points (2)

Table 15-3 shows the Excel objects that have at least five children. As we can see by comparing the sizes of Tables 15-2 and 15-3, most objects by far have fewer than five children.

Table 15-3. Excel 10 objects with 5 or more children

Application (32)

DataLabel (6)

Point (5)

Axis (6)

DataLabels (6)

Range (22)

AxisTitle (6)

DisplayUnitLabel (6)

Series (6)

Chart (16)

Legend (5)

Shape (22)

ChartArea (5)

OLEObject (5)

ShapeRange (17)

ChartGroup (7)

OLEObjects (6)

Window (7)

ChartObject (6)

PivotCell (6)

Workbook (14)

ChartObjects (6)

PivotField (5)

Worksheet (17)

ChartTitle (6)

PivotTable (8)

This list shows the only Excel 10 objects whose child count is in the double digits:

Application (32) Shape (22) Range (22) Worksheet (17) ShapeRange (17) Chart (16) Workbook (14)

Indeed, much of the power of the Excel object hierarchy is concentrated in the seven objects and much of the remainder of this book is devoted to those objects.

0 0

Post a comment