You are on page 1of 1

The first time that you save a workbook that is created from a template, Excel displays

its
Save As dialog box so that you can give the template a new name if you want to.
A custom template is essentially a normal workbook, and it can use any Excel feature,
such as
charts, formulas, and macros. Usually, a template is set up so that the user can enter
values and
get immediate results. In other words, most templates include everything but the data,
which is
entered by the user.
If your template contains macros, it must be saved as an Excel Macro-Enabled
Template, with an XLTM extension.

Inside an Excel File

Excel 2010 uses an XML format for its workbooks, templates, and add-ins. These files
are actually
Zip compressed files. As such, they can be unzipped and examined.
Versions prior to Excel 2007 used a binary file format. Although the binary file format
specifications
are known, working with binary files is not easy. The Excel XML file format, on the other
hand, is an open format. As such, these files can be created and manipulated using
other software.

Dissecting a file
In this section, I describe the various parts within a typical Excel XLSM (macro-enabled)
workbook
file. The workbook, named sample.xlsm, is shown in Figure 4-4. It has one worksheet,
one chart sheet, and a simple VBA macro. The worksheet contains a table, a button
(from the
Forms controls), a SmartArt diagram, and a photo of a flower.
The sample.xlsm workbook is available on the companion CD-ROM.

To view the innards of an Excel 2010 file, you need to open an Explorer window and add
a ZIP
extension to the filename. So the sample.xlsm file is renamed to sample.xlsm.zip. You
can
then open the file by using any unzipping program. I use the Zip feature built into
Windows Vista.
If your system is set up to hide file extensions, I suggest that you turn off that option. In
a Windows Explorer window, choose ToolsFolder Options and click the View tab. In
the File and Folders section, remove the check mark from Hide Extensions For Known
File Types.
You may prefer to extract the zipped files into an uncompressed directory. Doing so
makes it easier to view the files. In Windows, right-click the filename and choose
Extract All.

You might also like