50. Icons in the elements list Using XML in Excel Icon Element type Icon Element type Parent element Repeating child element Required parent element Required repeating child element Repeating parent element Attribute Required repeating parent element Required attribute Child element Simple content in a complex structure Required child element Required simple content in a complex structure
51.
52.
53.
54.
55.
56.
57.
58.
59.
60. USING THIS TEMPLATE See the notes pane or view the full notes page (View menu) for detailed help on this template.
Notes de l'éditeur
[ Note to trainer : For detailed help in customizing this template, see the very last slide. Also, look for additional lesson text in the notes pane of some slides.] Before you begin : This course requires a basic understanding of XML (including schemas and well-formed data) as well as Excel lists. You can download these templates: for more information about XML, “Training presentation—XML: What’s it all about?” and, for more information about lists, “Training presentation: Excel 2003—How to use lists”.
Extensible Markup Language (XML) is now a widely accepted standard for sharing data among computer users and computer systems. New tools in Excel 2003 make it easier to work with XML. Learn how to use these tools to create XML lists and XML maps. XML lists have the same look and feel as regular Excel lists, but they take their data from XML files. XML maps are sets of links between the cells in a worksheet and the elements in an XML schema. You can import data into the map, modify it, and then save the changed data or export it for others to use.
Before you start using XML in Excel 2003, you need to understand the concept of XML maps, and how to go about creating one.
The rest of this course introduces you to XML maps, and teaches you how to create and use them. [ Note to trainer : This course doesn't assume that you already have an XML schema or a data file. If you can connect to the practice, which requires Excel 2003, it provides a workbook and a sample XML data file for you to practice with.]
The previous sections mentioned that you can't work with XML in Excel unless you first create an XML map. By design, a schema doesn't contain any data. So when you create a map, the cells in the map remain empty until you enter or import data into them. [ Note to trainer : Steps—given in either numbered or bulleted lists—are always shown in yellow text.]
The second lesson in this course shows you how to open data files as XML lists.
This option is how you take advantage of the power that XML can provide. The third lesson in this course shows you how to use the XML Source task pane.
You don't need to worry about importing or otherwise entering data when you create an XML list. Whether you enter or import data, Excel behaves normally — you can type numbers or text, press ENTER to move to an adjacent cell, and so on.
Excel saves the data, any formatting, and any additional objects (such as images and graphs) to the workbook file. [ Note to trainer : Steps—given in either numbered or bulleted lists—are always shown in yellow text.]
When you save files this way, Excel writes the data to a well-formed XML file that other XML users or systems can process. However, Excel removes any formatting and additional objects.
If you're already familiar with the new Excel list feature, you should feel right at home with an XML list.
XML lists use XML data files, while Excel lists take their data from a range of cells in a worksheet. [ Note to trainer : The figure at left depicts part of the list that you'll create in the practice session for this lesson. The practice session requires Excel 2003.]
For instance, you might open a file this way just to see if you're looking at the correct data, or when you're in a hurry to find some numbers or calculate a total. Keep in mind, however, that opening an XML data file as an XML list loads all the data from the file into your worksheet. That can give you a large amount of data, and it can expose sensitive data that you don't want others to see.
1 st bulleted item: Excel uses every element in the schema, and you have no control over the map or the amount of data that Excel loads into your worksheet. 2 nd bulleted item: You can only save the workbook as a .xls file.
[ Note to trainer : With Excel 2003 installed on your computer, you can click the link in the slide to go to an online practice. In the practice, you can work through each of these tasks in Excel, with instructions to guide you. Important : The practices for this course require that you have Microsoft Office Excel 2003, or that you have Microsoft Office Professional Edition 2003. You cannot complete the practices by using the version of Excel in Microsoft Office Standard Edition 2003. If you don’t have Excel 2003, you won’t be able to access the practice instructions.]
Also, any changes you make can be saved to a separate XML data file that other systems and users can process.
1 st bulleted item: When you export data or save as XML, you write the data to a separate XML file. In contrast, the XML list option that you explored in the previous lesson writes any changes to the workbook. 2 nd bulleted item: [The practice session, which requires Excel 2003, shows you how to refresh data by importing it.] Depending on your situation, your IT department may have already set up a system to automate that process (to refresh data by importing it).
The figure at left illustrates the idea.
The figure at left illustrates the idea.
Also, now that you have a map, you can reuse it. For example, as new purchase orders arrive, your system could automatically create a new workbook and attach the map to that workbook. The exact mechanics are up to you or your IT department. The key point to remember is that you can create a map once and then use it as needed.
[ Note to trainer : With Excel 2003 installed on your computer, you can click the link in the slide to go to an online practice. In the practice, you can work through each of these tasks in Excel, with instructions to guide you. Important : The practices for this course require that you have Microsoft Office Excel 2003, or that you have Microsoft Office Professional Edition 2003. You cannot complete the practices by using the version of Excel in Microsoft Office Standard Edition 2003. If you don’t have Excel 2003, you won’t be able to access the practice instructions.]
After you click Open on the File menu, in the Files of type list, select XML Files (*.xml), locate and select the desired XML file, and then click Open . Click Use the XML Source task pane , and then click OK . When you open the task pane by clicking the Use the XML Source task pane command, Excel automatically creates a new workbook for you. To show or hide the task pane, press CTRL+F1.
You can use any of the maps that have been added to a workbook as long as you don't try to map a cell twice. The list uses the same kind of tree structure that you see in Windows Explorer, but it uses different icons. See the next section for more information about the icons.
For more information about the options, see the third segment in this lesson. Use the dialog box to add, delete, and rename XML maps, just like you did in the practice session for the previous lesson (you would only have been able to do the practice session if you have Excel 2003). In other words, this option helps ensure that you or another user don't accidentally enter invalid data into a mapped cell, and then try to export that invalid data.
You will probably map child elements most of the time.
This option works only when you create a map from a data file.
If you were able to do the exercise in Excel, you saw this behavior when you created a map in the first segment of the previous exercise (step 5, to be precise). If you clear this option, Excel uses the names of the repeating elements as headings.
Using This Template This Microsoft PowerPoint ® template has training content about using Excel 2003 to create XML lists and XML maps. It's geared for you to present to a group and customize as necessary. This template's content is adapted from the Microsoft Office Online Training course “So that’s how: Using XML in Excel 2003.” Features of the template Title slide: On the very first slide, there are empty brackets over which you should type the name of your company. Or you can delete the text box altogether if you don't want this text. Animations: Custom animation effects are applied throughout. They'll play in previous versions back to Microsoft PowerPoint 2000. They include the entrance effects called Peek and Stretch . To alter them, go to the Slide Show menu, click Custom Animation , and work with the options that appear. Slide transitions: The Wipe Down transition is applied throughout the show. If you want a different one, go to the Slide Show menu, click Slide Transition , and work with the options that appear. Hyperlinks to online course: The template contains links to the online version of this training course. The links take you to the hands-on practice session for each lesson and to the Quick Reference Card that is published for this course. Please take note: You must have Excel 2003 installed to view the hands-on practice sessions. Headers and footers: The template contains a footer that has the course title. You can change or remove the footers in the Header and Footer dialog box (which opens from the View menu).