XML and Excel

What is XML? ■ XML Support in Excel 2002 ■ Creating XML Spreadsheet Files with VBA ■ Viewing the XML Source File in Notepad ■ Well-Formed XML Documents ■ Viewing the XML Source File in Internet Explorer ■ Building XML Files Outside of Microsoft Excel 2002 ■ The XML Flattener ■ Formatting XML Data with Stylesheets ■ Linking an XML Document to a Stylesheet ■ Viewing XML Documents Formatted with Stylesheets ■ Using an XSLT Template ■ XML Data Islands ■ Using VBScript to Transform the Contents of XML Data Islands ■ Saving a Range of Cells as an XML Document ■ The XML Document Object Model ■ Transforming XML into HTML with an XSL Stylesheet Programmatically ■ Using VBScript and XML DOM to Transform XML Documents ■ Working with XML Document Nodes ■ Retrieving Information from Element Nodes ■ XML via ADO ■ Saving an ADO Recordset as XML to Disk ■ Two Types of XML Files ■ Applying an XSL Stylesheet ■ Transforming Attribute-Based XML Data into an HTML Table ■ Loading an ADO Recordset ■ Saving the ADO Recordset to XML in Memory

■ Saving the ADO Recordset into the XML DOMDocument Object

■ XML and ASP ■ Posting Excel XML Data to a Web Server ■ What's Next...

In the previous chapter you mastered several techniques of using Excel with the Internet. You've used HTML, ASP and VBScript to put Excel worksheets on the web and retrieved web data via web queries for further manipulation in Excel. This chapter expands your knowledge of Internet technologies by introducing you to new XML functionality that has been added to Excel 2002.

What is XML?

XML, which stands for Extensible Markup Language, is an exciting new technology that provides a mechanism for designing your own custom markup language and using that language for describing the data in your own documents. Although XML was designed specifically for delivering information over the World Wide Web, it is being utilized in other areas, such as storing, sharing, and exchanging data.

Like HTML, XML is a markup language. However, HTML and XML serve different functions: HTML describes web page layout by using a set of fixed non-customizable tags, while XML lets you describe data content using custom tags.

The main goal of XML is the separation of content from presentation. Because XML documents are text files, XML is independent of an operating system platform, a software vendor, and a natural or programming language. XML makes it easy to describe any data structure (structured or unstructured) and send it anywhere across the web using common protocols, such as HTTP or FTP As long as any two organizations can agree on the XML tag set to be used to represent the data being exchanged, it doesn't matter what back-end systems these organizations run or databases they use.

Although anyone can describe the data by creating a set of custom tags, the representatives of many industry groups have defined and published XML schemas that dictate how XML documents are formatted to represent data for their industry. A good example is the Microsoft XML-SS schema, which finally allows you to describe spreadsheet data (more details on it later in this chapter), or Chemical Markup Language (CML), which defines how to use XML to describe data for the chemical industry.

You can find information on XML-related specifications and proposals and domain-specific XML vocabularies at http://www.w3.org or http://www.wdvl.com/Authoring/Languages/XML/Specifications.html or by searching for "XML Vocabularies" in your browser.

0 0

Post a comment