Programming MS Office Web Components The first chapter, section III

Source: Internet
Author: User
Tags documentation implement require versions microsoft frontpage microsoft outlook
Where can the Web use these components?



Since Office Web components are all COM controls, it's natural to expect them to work in any environment that claims to be a COM control container. However, theory and reality are not always consistent, especially in the software world. Microsoft has created a lot of environments that can contain controls (16 of our group talk), and other companies have created many other environments.



To avoid the madness of office testing teams, we conducted different levels of Office Web components testing for different containers. First, we pick out the containers that we think people use the most, and do a full test. We then conducted basic and special tests in the infrequently used containers. Finally, we organize some containers to form a "no formal test, but no catastrophic consequences when used". Table 1-1 shows the containers in this range.

Table 1-1. The tested container.

Container
Test Coverage

Microsoft Internet Explorer 5.0
Full

Microsoft Internet Explorer 4.01
Full

Microsoft Internet Explorer 3.x
Not supported

Microsoft Visual Basic 6.0
Full

Microsoft Visual Basic 5.0
Basic

Microsoft Visual InterDev
Basic

Microsoft Access Forms
Basic

Microsoft Office UserForms
Basic

Microsoft FrontPage 99
Full

Microsoft FrontPage 98
Basic

Microsoft Access Data Access Page Designer
Full

Microsoft Script Editor
Full

Microsoft Word 2000
Basic

Microsoft Excel 2000
Basic

Microsoft PowerPoint 2000
Basic

Microsoft Outlook 2000
Basic

Microsoft Visual C++/mfc Projects
None

Microsoft Visual J + +
None





Also, be aware that in different containers, the design-time behavior of the control varies greatly. Because Office Web components is a fairly complex control, you often need to select elements within the control (such as cells in a spreadsheet, pivot fields in a PivotTable report, or a series of data points in a chart), and format or work with those elements. In order to be able to implement this feature, controls are activated in containers that allow the control interface to be activated, which means that the controls respond to mouse and keyboard events. Any modifications you make to a control in design mode are preserved when the control is overloaded during run time, along with the document or form, which makes the control appear exactly as you saved them when they were reset. Some containers activate the control interface as soon as you click the control. Other containers require that you double-click the control. There are other containers that require you to activate these controls with two clicks. These actions are entirely determined by the container. Therefore, refer to the container's documentation to see how the container handles COM controls at design time.

Note that these do not affect the behavior of the control during the run. During run time, all containers activate the control interface after the control has been loaded. However, some environments, such as Office documents, will never enter the running state because you are always editing the currently loaded document. While the Internet exlporer,visual basic,visual c++,access forms and Office user interfaces have run-time patterns, the controls are immediately activated.



Data access page and Internet Explorer 5

If you read any Access2000 documents, you are likely to see statements that tell you that you can only browse data access pages in the Internet Explorer5 or later. Although this is true, this statement generally does not apply to Office Web components. These components can be used in Internet Explorer versions 4.01 and above, but they cannot be used in any earlier versions (4.0,3.x,2.x, etc.). This version requirement also applies to any interactive content created using Excel2000 (the creation process uses the Office Web components), as well as to custom solutions developed using these components. Data access pages require some special features of the Internet Explorer5, which is why they can only run in this environment. However, the Office Web components itself can be well used in the tested containers listed above.



Using the Office Web components on the server

As mentioned earlier, Office Web components can reside in a form, document, or Web page as a control, or reside in memory in the form of an object without a user interface. Each control provides a property or method to return the static representation of the current content of the control. Charts and PivotTable controls can create GIF graphics for their content, and spreadsheet controls can return an HTML table fragment or a complete page that can be displayed in any HTML3.2-compatible browser. All of this means that you can use these controls on a Web server to achieve server-side graphical and PivotChart reports, or to implement a server-side spreadsheet model. I will demonstrate some of these techniques in the second part of this book.



In addition to discussing how to use these controls on the server, we also examine a number of finer issues in the back of this book, such as performance, scalability, and reliability.



Deployment

One of the most compelling aspects of web-based solutions is that you do not need an application's display installation. The things that need to be done are either programmed in the form of a script or downloaded automatically as a applets or COM control. The Office WEB components can implement deployment and automatic update mechanisms that do not need to be installed by using the codebase features of Internet Explorer. These components also include a sophisticated web installation tool that makes the download process very interesting. Also, OWC is technically not dependent on Office 2000, so it can coexist with Office97 environments and be used on machines that do not have any Office software installed.



The 12th chapter will cover all aspects of the deployment task and how to establish a solution for automating deployment of OWC.

What about Netscape Navigator?



When I was talking about Office Web components in seminars and other user gatherings, the question was always asked: "Can these components run in Netscape Navigator?" "The answer is clear" no, "but there are some places to explain."

Netscape Navigator 4.5 does not natively support COM controls, so the Office Web components cannot even be loaded by Netscape Navigaotor If no plug-ins are installed. However, a company named NCompass Labs has developed a control for Netscape Navigator that allows Netscape Navigator to control COM controls on Web pages. So, if you install this plugin, can you use these components in Netscape Navigator? The answer is "look at the situation," and here are some things to explain.



You might use OWC to build many solutions that contain communication between components-for example, a chart that is bound to a PivotTable or spreadsheet, or a spreadsheet cell that is bound to other element properties on a page. These solutions require the support of the features provided by Internet Explorer. Even Netscape Navigator, which has the NCompass plug-in, does not offer these capabilities, so these solutions do not work in Netscape Navigator at all.



solutions that use individual components or multiple components that do not communicate with each other are likely to run successfully in Netscape Navigator. However, this is one of the containers that our test team did not study, so I cannot guarantee that it will succeed.



You should remember, however, that static content generated by controls on the server can be displayed in Netscape Navigator and Internet Explorer. So if your running environment needs to support two of browsers, you might be interested in how to use these components on a Web server and the solutions that demonstrate the technologies that implement them.







Appendix: Original English



Where Can You use the components?



Since The Office Web components are COM controls, you ' d naturally expect-them to work into any environment that called f a COM control container. However, Theory and reality don ' t always match up, especially into the world of software. Microsoft makes many environments that can contain controls (we team could recall out the top for our heads), and Various other companies create many others.

To keep the office Test team from going mad, we tested the Office Web components at different levels in different containe Rs. We picked the containers we thought people would use most and performed in full test passes on them. We then performed basic, ad hoc testing on the containers used less. And finally, we grouped a few containers into the "not" formally tested but doesn ' t cause a nuclear meltdown when tried ' CA Tegory. Table 1-1 shows which containers fell into what category.

Table 1-1. Tested containers.

Container
Test Coverage

Microsoft Internet Explorer 5.0
Full

Microsoft Internet Explorer 4.01
Full

Microsoft Internet Explorer 3.x
Not supported

Microsoft Visual Basic 6.0
Full

Microsoft Visual Basic 5.0
Basic

Microsoft Visual InterDev
Basic

Microsoft Access Forms
Basic

Microsoft Office UserForms
Basic

Microsoft FrontPage 99
Full

Microsoft FrontPage 98
Basic

Microsoft Access Data Access Page Designer
Full

Microsoft Script Editor
Full

Microsoft Word 2000
Basic

Microsoft Excel 2000
Basic

Microsoft PowerPoint 2000
Basic

Microsoft Outlook 2000
Basic

Microsoft Visual C++/mfc Projects
None

Microsoft Visual J + +
None



Also Note This design-time activation of the controls varies quite a bit from container to container. Since The Office Web components are fairly complex controls, it is often necessary to select elements a control (SU Ch as a cell in a spreadsheet, a pivot field in a PivotTable, or a series of the data points in a chart) and format or Perform operations on them. To enable this functionality, the controls would become UI active in containers so allow this, meaning they would respond to mouse and keyboard events. Any changes made to the controls in design mode would persist with the document or form when it is reloaded at runtime, res Etting the controls to look exactly as they did while you saved them. Some containers make the controls UI active as soon as you click them. Others require that you double-click the control before it becomes UI active. Still containers require to single-click them twice to activate. This behavior was entirely determined by the ContaiNer, so refer to the container's documentation to-to-do it deals with COM controls in design time.

This is does affect a control's runtime behavior. At runtime, all containers make the controls UI active after loading them. But some environments, such as Office documents, never get to a runtime state because you are always editing the Documen T that ' s currently loaded. Internet Explorer, Visual Basic, Visual C + +, Access Forms, and Office UserForms all have a runtime mode in which the CONTR OLS are immediately active.

Data Access Pages and Internet Explorer 5



If you read any of the "access" documentation, you'll likely to statements that say can view data Access pages O Nly in Internet Explorer version 5 and above. Although true, that statement does does not apply to the Office Web components. The components would function in Internet Explorer 4.01 and above, though they won ' t function into any earlier versions (4.0, 3.x, 2.x, and so on). This applies to any interactive content created with Excel (which uses, the Office Web components) and to custom Solut Ions developed using the components.

Data access pages rely on a few specific features in Internet Explorer 5, which are why they only run in that environment. However, the Office Web components themselves can run quite happily in the tested containers.

Using the Office Web components on a Server



As mentioned before, the Office Web components were designed to run both as controls "sited" within a form, document, or W EB page, and as objects in memory with no user interface. Each of the controls exposes a and method is returns a static representation of the IT current content. The Chart and PivotTable controls can create GIF images of their content, and the spreadsheet control can return a HTML t Able fragment or full page, can is rendered by any browser that ' s compatible with HTML 3.2. All of this means can-components on a Web server to perform server-side generation of chart images and Pivotta BLE reports or server-side recalculation of a spreadsheet model. I ' ll demonstrate a few of those techniques in part II of the book.

Besides discussing the how-to of using the components on the server, we'll examine a number of more subtle issues To performance, scalability, and reliability later.

Deployment



One of the more attractive aspects of web-based solutions are that they don ' t require explicit the setup of a application. Anything needed is either included with the Web page in the form of scripts or is automatically downloaded as applets or C OM controls. The Office Web components enable a No-install deployment and automatic upgrade mechanism by using the codebase of Internet Explorer. The components also include a sophisticated web installing control, makes the download experience . Furthermore, OWC has no technological dependency on office and so it can coexist in a office, environment or be used On a machine so doesn ' t have any of the other part of Office installed.

I ' ll cover all the aspects of deployment and how can builds your solutions to automatically deploy OWC in Chapter 12.

What about Netscape Navigator?



When I talk about the Office Web components in conferences or other customer gatherings, invariably someone the asks Ion, "Do this run in Netscape Navigator?" The answer is essentially "no," but it has a few caveats.

Netscape Navigator 4.5 does not natively support COM controls, so without any plug-ins, the Office Web components ' t ev En is loaded by Netscape Navigator. However, a company called NCompass Labs, Inc. makes a plug-in for Netscape Navigator so can host COM controls in a Web p Age. So if you are installed this plug-in, could you use the components in Netscape Navigator? The answer is "it depends" and, again, has a few caveats.

Many Solutions you might builds with OWC involve communication between the Components-for instance, a chart bound to a pivo ttable or spreadsheet, or a spreadsheet cell bound to the "property of another element" on the page. These solutions depend on functionality provided in Internet Explorer this isn ' t present in Netscape Navigator even with T He ncompass plug-in, so they simply won ' t work in Netscape Navigator.

Using a single component or multiple components that does not communicate with one another be possible in Netscape Navigator . However, this is one of the containers that we test team did isn't, so I can ' t guarantee that it'll work.

You should always remember, however, which static content generated by the controls on the server can is rendered in either Netscape Navigator or Internet Explorer. So if your runtime environment requires this support both, you browsers'll be more probably in using the Components on your Web server and in the solutions, the show the techniques.


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.