O'Reilly logo

Office 2003 XML by Evan Lenz, Mary McRae, Simon St. Laurent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Using SpreadsheetML

While many users will find Excel’s easy import of XML documents useful, developers who need to read or create Excel spreadsheets may find a completely different set of capabilities more relevant. The functionality provided in Spreadsheet ML, which was also available in Microsoft Excel XP, allows developers to save spreadsheets as XML documents and to open those XML spreadsheets in Excel. If you need to create or process spreadsheets using XML, then this chapter will give you the foundations you need.

Tip

Microsoft offers the Office 2003 XML Reference Schemas from http://microsoft.com/downloads/. If you want a complete definition of every component in SpreadsheetML, the schema and its documentation are much more detailed than this chapter can be.

Saving and Opening XML Spreadsheets

Excel treats XML spreadsheet files pretty much like regular .xls binary files. Microsoft has captured nearly all of the information stored in Excel workbooks in its XML format, with some major exceptions, including embedded Visual Basic for Applications (VBA), charting information, OLE objects, and drawing objects. It works very well for basic data import and export, but not as well for more sophisticated spreadsheets. While you can, for example, use VBA and charting on information stored in the XML maps described in Chapter 6, that functionality will be lost if you save the spreadsheet itself in SpreadsheetML and don’t keep a .xls copy.

Tip

If you need access to Excel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required