Share this Page URL

Chapter 14. Charting XML Data > Notes on This Case Study - Pg. 347

Charting XML Data 347 Notes on This Case Study This case study features the automation of multiple chart creation. The ChartWizard method handles the chart creation. Some additional parameters are applied to each chart to control size and position. The series data for the charts comes from an XML file. New features of Microsoft Office Excel 2003 are used to import the XML data. However, Excel 2003 installation is not complete throughout the firm, so an additional routine is included for users of older versions of Excel. XML Data The results of sales presentations are graded. There are five data points in the data: program name, region, city, grade, and presentation date. The data is stored in XML format. The root element is named Grades. Within the root are Record elements, which in turn have the five children elements. A business decision has been made to leave out customer names to ensure lack of bias. Listing 14.1 shows a portion of the XML file. Example 14.1. The grades are kept in an XML file. <?xml version="1.0"?> <Grades xmlns:xsi="" xsi:noNamespaceSchemaLocation="grades.xsd"> <Record> <Program>CoopAds</Program> <Region>East</Region> <City>Philadelphia</City> <Grade>B</Grade> <Date>3/2/2003</Date>