Microsoft Office Tutorials and References
In Depth Information
The OfficeUI File
Why is the file format important?
The open XML file formats introduced in Microsoft Office 2007 represent a significant step for the
computing community. For the first time, it’s relatively easy to read and write Excel workbooks
using software other than Excel. For example, you can write a program to modify thousands of
Excel workbook files without even opening Excel. Such a program could insert a new worksheet
into every file. The programmer, of course, would need to have excellent knowledge of the XML
file structures, but such a task is definitely doable.
Importantly, the new file formats are somewhat less prone to corruption (compared to the old
binary formats). I saved a workbook file and then deleted one of the worksheet XML files. When I
tried to reopen it in Excel, I got the message shown in Figure 4-7. Excel was able to tell that the
file was damaged by comparing the information in the .res files with what’s actually in the file.
In this case, Excel was able to repair the file and open it. The deleted worksheet was re-inserted,
but it was empty.
Figure 4-7: Excel can often repair a damaged workbook file.
In addition, the zipped XML files are usually smaller than comparable binary files. And, finally, the
structured nature of the files makes extracting individual elements (for example, all graphic
The typical Excel user won’t need to examine or modify the XML components of a workbook file.
But, as a developer, you may want to write code that changes Excel’s Ribbon user interface. If
that’s the case, you will need to be at least somewhat familiar with the structure of a workbook
Refer to Chapter 22 for more information about modifying Excel’s Ribbon.
The OfficeUI File
A file named Excel.officeUI stores changes made to the Quick Access toolbar and Ribbon.
This XML file is located here: