Programming Microsoft Office 2000 Web Components第一章第一节[11]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 daidaoke2001 的 blog

com is also known as activex. i was on the visual basic team when microsoft invented the term "activex" to describe the com technologies, throwing most of our customers for a loop since they had just gotten used to saying com after we stopped using the term "ole." since i'm not a marketing person, i'll just use the term com in this book to describe the component object model technologies. (throw…for a loop:大吃一惊)

the word "office" in the name "office web components" indicates that the controls were developed by some of the same programmers who created microsoft excel and microsoft access and that the controls were made to look, feel, and behave like small versions of their microsoft office siblings. these controls definitely don't have all the features found in excel and access—in other words, you wouldn't want to dynamically download all of excel and access to view a report in your browser! however, the controls do contain many of the commonly used features, especially those needed when interacting with content that's already been created. plus, they can read and write the html file format of excel 2000, allowing the user to click a button and load the current data into excel for more powerful analysis. in this book, i'll detail the noteworthy excel or access features that are and aren't supported by each component. i'll also show you how to add some of these missing features with your own code.

the "web" part of owc's name is often misleading. the controls are standard com controls and can be used in many control containers such as microsoft internet explorer, microsoft visual basic, microsoft visual c++, microsoft visual foxpro, or microsoft office userforms. however, the controls have a few behaviors that make them especially suited to the unique environment of internet explorer. for example, web browsers automatically support scrolling along a document, and it's often annoying for a control in the page to have its own set of scroll bars. the spreadsheet and pivottable controls can be set to automatically adjust themselves to fit their current content without requiring internal scroll bars. also, all the controls support the color names available in internet explorer in addition to supporting numeric rgb values. that means you can set the background color of an element to "cornsilk" or "papayawhip" (my personal favorite), and the control will convert the color to the appropriate rgb value just as internet explorer would.

the "components" part of owc's name is a touch confusing, although it's more accurate than using the word "controls" (though i will often refer to owc as "controls" for convenience throughout this book). the office web components are unusual in that they can be used in control containers like web pages, visual basic forms, and so on, as well as in memory as invisible objects. most com controls can be used only as visible controls in control containers, and most invisible objects, such as those accessed via the microsoft activex data objects (ado) interface, can be used only in memory and cannot be put on a form or web page. the owc library was built so that its components could be used either way, which enables you to use the controls with the user interfaces they expose or for their base services, such as spreadsheet recalculation. the ability to use the components as invisible objects also enables you to use the library on a server to easily generate static content that users can view in any web browser (more on that later in the chapter).

本文关键:owc Office Web Components Report SpreadSheet Chart PivotTable
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top