CHAPTER 6
Understanding Excel Files and Templates

This chapter describes the operations that you perform with workbook files: opening, saving, closing, and so on. It discusses how Excel uses files and provides an overview of the various types of files. Most of the file operations discussed here occur in the Backstage view, the screen that you see when you click the File button above the Excel Ribbon. It also discusses templates, a special kind of workbook file.

Creating a New Workbook

When you start Excel, it displays a Start screen that lists recently used files and shows templates that you can use as the basis for a new workbook. One of the template options is Blank Workbook, which gives you an empty workbook. Figure 6.1 shows a portion of the Start screen.

After you start Excel and create a blank workbook, the empty workbook is called Book1. This workbook exists only in memory, and it hasn't been saved to disk. By default, this workbook contains one worksheet named Sheet1. If you're starting a project from scratch, you can use this blank workbook. By the way, you can change the default number of sheets in a new workbook by using the General tab of the Excel Options dialog box.

Snapshot of choosing Blank workbook from Excel's Start screen

FIGURE 6.1 Choosing Blank workbook from Excel's Start screen

While you're working in Excel, you can create a new (empty) workbook at any time. Excel provides two ways to create a new workbook:

  • Choose File ➪ New, which displays a screen that lets you create a blank workbook or a workbook based on a template. To create a new blank workbook, click Blank workbook.
  • Press Ctrl+N. This shortcut is the fastest way to start a new workbook if you're not using a template.

Opening an Existing Workbook

Here are some of the ways to open a workbook that's already been saved:

  • Choose File ➪ Open ➪ Recent and then select the file that you want from the list on the right. Only the most recently used files are listed. You can specify the number of files to display (maximum of 50) in the Advanced section of the Excel Options dialog box.
  • Choose File ➪ Open and choose a location from the list on the left. The locations will vary depending on which “places” you've set up. You may see cloud-based options. One of the options is always This PC. You can navigate to your files directly using the list, or you can click Browse to display the Open dialog box, which gives you many more options.
  • Locate the Excel workbook file via a File Explorer file list. Just double-click the filename (or icon), and the workbook opens in Excel. If Excel isn't running, Windows automatically starts Excel and loads the workbook file.

To open a workbook from the Open dialog box, use the folder tree display on the left to locate the folder that contains the file and then select the workbook file from the list on the right. You can resize the Open dialog box by using the control in the lower-right corner. After you locate and select the file, click Open, and the file opens. Or just double-click the filename to open it.

Notice that the Open button is actually a drop-down list. Click the arrow, and you will see these additional options:

  • Open  Opens the file normally.
  • Open Read-Only  Opens the selected file in read-only mode. When a file is opened in this mode, you can't save changes with the original filename.
  • Open as Copy  Opens a copy of the selected file. If the file is named budget.xlsx, the workbook that opens is named Copy(1)budget.xlsx.
  • Open in Browser  Opens the file in your default web browser. If the file can't be opened in a browser, this option is disabled.
  • Open in Protected View  Opens the file in a special mode that doesn't allow editing. In this view, most of the Excel Ribbon commands are disabled. Read more about this feature in the nearby sidebar “About Protected View.”
  • Open and Repair  Attempts to open a file that may be damaged and recover information contained in it.
  • Show Previous Versions  Applies to documents stored where version histories are maintained, as on OneDrive or SharePoint Online.

Filtering filenames

Near the bottom-right corner of the Open dialog box is a drop-down list. When the Open dialog box is displayed, this list defaults to All Excel Files (and a long list of filename extensions). The Open dialog box displays only those files that match the filename extensions. In other words, you see only standard Excel files.

If you want to open a file of a different type, click the arrow in the drop-down list and select the file type that you want to open. This changes the filtering and displays only files of the type that you specify.

You can also type a filter directly in the File Name box. For example, typing *.xlsx will display only files that have an .xlsx filename extension. Press Enter after typing the filter.

Choosing your file display preferences

The Open dialog box can display your workbook filenames in several styles: as a list, with complete details, as icons, and so on. You control the style by clicking the More Options arrow (near the upper-right corner) and then selecting a display style from the drop-down list.

Saving a Workbook

When you're working in Excel, your workbook is vulnerable to day-ruining events such as power failures and system crashes. Therefore, you should save your work often. Saving a file takes only a few seconds, but re-creating lost work can take many hours.

Excel provides four ways to save your workbook:

  • Click the Save icon on the Quick Access Toolbar. (It looks like an old-fashioned floppy disk.)
  • Press Ctrl+S.
  • Press Shift+F12.
  • Choose File ➪ Save.

If your workbook has already been saved, it's saved again using the same filename in the same location. If you want to save the workbook to a new file or to a different location, choose File ➪ Save As (or press F12).

If your workbook has never been saved, Excel displays a Save This File dialog box, as shown in Figure 6.2. You can enter a filename and choose a location, such as on your PC or in your OneDrive account—if you have one. A new (unsaved) workbook has a default name, such as Book1 or Book2. Although Excel allows you to use these generic workbook names for filenames, you'll almost always want to specify a more descriptive filename. This dialog box has a More Options link that takes you to the Save As portion of Backstage view.

Snapshot of saving a previously unsaved workbook

FIGURE 6.2 Saving a previously unsaved workbook

The Save As portion of Backstage view has most of the same information as the Save This File dialog box, just in a different layout. There are locations on the left side and folders on the right side. The Browse option on the left opens the classic Save As dialog box. The Save As dialog box is similar to the Open dialog box. Select the desired folder in the folder list on the left. After you select the folder, enter the filename in the File Name field. You don't need to specify a filename extension—Excel adds it automatically, based on the file type specified in the Save as Type field. By default, files are saved in the standard Excel file format, which uses an .xlsx filename extension. If the file contains macros, Excel defaults to the .xlsm filename extension.

If a file with the same name already exists in the location that you specify, Excel asks whether you want to overwrite that file with the new file. Be careful! You can't recover the previous file after you overwrite it.

Using AutoRecover

If you've used computers for any length of time, you've probably lost some work. You forgot to save a file, or maybe the power went out and your unsaved work was lost. Or maybe you were working on something and didn't think it was important, so you closed the file without saving. Of course, later you realized that it was indeed important. Excel's AutoRecover feature might make these types of “d'oh!” moments less frequent.

As you work in Excel, your work is periodically saved automatically. It happens in the background so you don't even know that it's happening. If necessary, you can access these autosaved versions of your work. This even applies to workbooks that you never explicitly saved.

The AutoRecover feature consists of two components:

  • Versions of a workbook are saved automatically, and you can view them.
  • Workbooks that you closed without saving are saved as draft versions.

Recovering versions of the current workbook

To see whether any previous versions of the active workbook are available, choose File ➪ Info. The Manage Workbook section lists the available old versions (if any) of the current workbook. In some cases, more than one autosaved version will be listed. In other cases, no autosaved versions will be available. Figure 6.3 shows a workbook with two recovery points.

You can open an autosaved version by clicking its name. Remember that opening an autosaved version won't automatically replace the current version of your workbook. Therefore, you can decide whether the autosaved version is preferable to the current version. Or you can just copy some information that may have been accidentally deleted and paste it to your current workbook.

When you close the workbook, the autosaved versions are deleted.

Snapshot of recovering older versions of your workbook.

FIGURE 6.3 You can recover older versions of your workbook.

Recovering unsaved work

When you close a workbook without saving your changes, Excel asks if you're sure. If that unsaved workbook has an autosaved version, the Are You Sure dialog box informs you of that fact.

To recover a workbook that you closed without saving, choose File ➪ Info ➪ Manage Workbook ➪ Recover Unsaved Workbooks. You'll see a list of all draft versions of your workbooks. You can open them and (if you're lucky) recover something that you needed. Note that the unsaved workbooks are stored in the XLSB file format and are read-only files. If you want to save one of these files, you need to provide a new name.

Draft versions are deleted after four days or when you edit the file.

Configuring AutoRecover

Normally, AutoRecover files are saved every 10 minutes. You can adjust the AutoRecover save time on the Save tab of the Excel Options dialog box. You can specify a save interval of from 1 to 120 minutes.

If you work with sensitive documents, you might prefer that previous versions aren't saved automatically on your computer. The Save tab of the Excel Options dialog box lets you disable this feature completely or disable it just for a specific workbook.

Password-Protecting a Workbook

In some cases, you may want to specify a password for your workbook. When a user attempts to open a password-protected workbook, a password must be entered before the file is opened.

To set a password for a workbook, follow these steps:

  1. Choose File ➪ Info and click the Protect Workbook button. This button displays some additional options in a drop-down list.
  2. Choose Encrypt with Password from the list. Excel displays the Encrypt Document dialog box, as shown in Figure 6.4.
    Snapshot of the Encrypt Document dialog box is where you specify a password for your workbook.

    FIGURE 6.4 The Encrypt Document dialog box is where you specify a password for your workbook.

  3. Enter the password, click OK, and then enter it again.
  4. Click OK and save the workbook.

When you reopen the workbook, you'll be prompted for a password.

Organizing Your Files

If you have hundreds of Excel files, you might have a problem locating the workbook that you need. Using descriptive filenames can help. Using folders and subfolders (with descriptive names) also makes it easier to find the particular file you need. In some cases, though, that's not enough.

Fortunately, Excel lets you assign a variety of descriptive information (sometimes known as metadata) to a workbook. These are known as document properties. This information includes such items as the author, tags, and categories.

When you choose File ➪ Info, you can view (or modify) the document properties for the active workbook. This information is shown on the right side of the screen. Click the link at the bottom to toggle between showing more or fewer properties.

Other Workbook Info Options

The Info pane of Backstage view displays more file-related options. To display this pane, choose File ➪ Info. These options, described in the following sections, may be useful if you plan to distribute your workbook to others. Note that not all workbooks display all the options described in the following sections. Only the relevant options are shown.

Protect Workbook options

The File ➪ Info ➪ Protect Workbook drop-down list contains the following options:

  • Always Open Read-Only  Use this option to save the file as read-only to prevent changes.
  • Encrypt with Password  Use this command to specify a password that is required to open the workbook. (See “Password-Protecting a Workbook” earlier in this chapter.)
  • Protect Current Sheet  This command lets you protect various elements of a worksheet. It displays the same dialog box as the Review ➪ Protect ➪ Protect Sheet command.
  • Protect Workbook Structure  This command lets you protect the structure of a workbook. It displays the same dialog box as Review ➪ Protect ➪ Protect Workbook.
  • Restrict Access  If your organization uses the Azure Rights Management System, you can connect your workbook to it and get more granular options for protecting it.
  • Add a Digital Signature  This command allows you to “sign” a workbook digitally so that users can trust that you signed it.
  • Mark as Final  Use this option to designate the workbook as “final.” The document is saved as a read-only file to prevent changes. This isn't a security feature. Rather, the Mark as Final command is useful to let others know that you're sharing a completed version of a workbook.

Check for Issues options

The File ➪ Info ➪ Check for Issues drop-down list contains the following options:

  • Inspect Document  This command displays the Document Inspector dialog box. The Document Inspector can alert you to some potentially private information that may be contained in your workbook—perhaps information that's contained in hidden rows or columns or hidden worksheets. If you plan to make a workbook available to a large audience, it's an excellent idea to use the Document Inspector for a final check.
  • Check Accessibility  This command checks the workbook for potential problems that might occur for people with disabilities. The results of the check are displayed in a task pane in the workbook.
  • Check Compatibility  This command is useful if you need to save your workbook in an older file format. It displays a helpful Compatibility Checker dialog box that lists potential compatibility problems. This dialog box also appears when you save a workbook using an older file format.

Version History

If you save your files to OneDrive, Microsoft will maintain a version history every time you save the file. You can view or restore prior versions.

Manage Workbook options

If Excel automatically saved previous versions of your workbook, you can recover one of the earlier versions.

Browser View options

If your workbook will be viewed in a web browser, you can specify which sheets and other objects will be viewable.

Compatibility Mode section

If the active workbook is an old workbook opened in compatibility mode, you'll see the Compatibility Mode section in the Info pane. To convert the workbook to the current Excel file format, click the Convert button.

Closing Workbooks

After you're finished with a workbook, you can close it to free the memory that it uses. Other workbooks will remain open. When you close the last open workbook, you also close Excel.

You can close a workbook by using any of the following methods:

  • Choose File ➪ Close.
  • Click the Close button (the X) in the right corner of the window's title bar.
  • Press Ctrl+F4.
  • Press Ctrl+W.

If you've made any changes to your workbook since it was last saved, Excel asks if you want to save the changes to the workbook before closing it.

Safeguarding Your Work

Nothing is more frustrating than spending hours creating a complicated Excel workbook only to have it destroyed by a power failure, a hard drive crash, or even human error. Fortunately, protecting yourself from these disasters is not a difficult task.

Earlier in the chapter, we discussed the AutoRecover feature that makes Excel save a backup copy of your workbook at regular intervals (see “Using AutoRecover”). AutoRecover is a good idea, but it certainly isn't the only backup protection you should use. If a workbook is important, you need to take extra steps to ensure its safety. The following backup options help ensure the safety of individual files:

  • Keep a backup copy of the file on the same drive. Although this option offers some protection if you make a mess of the workbook, it won't do you any good if the entire hard drive crashes.
  • Keep a backup copy on a different hard drive. This method assumes, of course, that your system has more than one hard drive. This option offers more protection than the preceding method because the likelihood that both hard drives will fail is remote. If the entire system is destroyed or stolen, however, you're out of luck.
  • Keep a backup copy on a network server. This method assumes that your system is connected to a server on which you can write files. This method is fairly safe. If the network server is located in the same building, however, you're at risk if the entire building burns down or is otherwise destroyed.
  • Keep a backup copy on an Internet backup site. Several websites specialize in storing backup files.
  • Keep a backup copy on a removable medium. This is probably the safest method. Using a removable medium, such as a USB drive, enables you to physically take the backup to another location. So if your system (or the entire building) is damaged, your backup copy remains intact.

Working with Templates

A template is essentially a model that serves as the basis for something else. An Excel template is a special type of workbook that's used as the basis to create other workbooks. The following sections discuss some of the templates available from Microsoft, and it describes how to create your own template files. Creating a template takes some time, but in the long run, doing so may save you a lot of work.

Exploring Excel templates

The best way to become familiar with Excel template files is to jump in and try a few. Excel gives you quick access to hundreds of template files.

Viewing templates

To explore the Excel templates, choose File ➪ New. The template thumbnails displayed on the screen that appears are just a small sampling of those that are available. Click one of the suggested search terms, or enter a descriptive word and search for more.

For example, enter invoice and click the Search button. Excel displays many thumbnails.

Figure 6.5 shows the results of a template search for invoice.

Snapshot of the New page in Backstage view allows you to search for templates.

FIGURE 6.5 The New page in Backstage view allows you to search for templates.

Creating a workbook from a template

To create a workbook based on a template, just locate a template that looks like it might do the job and click the thumbnail. Excel displays a box with a larger image, the source for the template, and some additional information. If it still looks good, click the Create button. Otherwise, click one of the arrows to view details for the next (or previous) template in the list.

When you click the Create button, Excel downloads the template and then creates a new workbook based on that template.

What you do next depends on the template. Every template is different, but most are self-explanatory. Some workbooks require customization. Just replace the generic information with your own information.

Figure 6.6 shows a workbook created from a template. This workbook needs to be customized in several areas. But if this template will be used again, it's more efficient to customize the template rather than every workbook created from the template.

Snapshot of a workbook created from a template

FIGURE 6.6 A workbook created from a template

If you want to save the newly created workbook, click the Save button. Excel proposes a filename based on the template's name, but you can use any filename you like.

Modifying a template

A template file that you download is just like a workbook file. You can open a template file, make changes to it, and then resave it. For example, with the invoice template shown in Figure 6.6, you may want to modify it so that it shows your company information and logo and uses your actual sales tax rate. Then, when you use that template in the future, the workbook created from it will already be customized.

To open a template for editing, choose File ➪ Open (not File ➪ New) and locate the template file (it will have an .xltx, .xltm, or .xlt filename extension). When you open a template file by choosing File ➪ Open, you're opening the actual template file—you are not creating a workbook from the template file.

One way to find the location of your downloaded template files is to look at your trusted locations list:

  1. Choose File ➪ Options. The Excel Options dialog box appears.
  2. Choose Trust Center and click the Trust Center Settings button. The Trust Center dialog box appears.
  3. In the Trust Center dialog box, choose Trusted Locations. You'll see a list of trusted locations. Downloaded templates are stored in the location described as User Templates. If you want to modify (or delete) a downloaded template, this is where you'll find it.

On our systems, downloaded templates are stored here:

C:Users<username>AppDataRoamingMicrosoftTemplates

After you've made changes to the template, use File ➪ Save to save the template file. Future workbooks that you create from this template will use the modified version of the template.

Using default templates

Excel supports three types of templates:

  • The default workbook template  This type is used as the basis for new workbooks.
  • The default worksheet template  This type is used as the basis for new worksheets inserted into a workbook.
  • Custom workbook templates  Usually, these ready-to-run workbooks include formulas, but they can be as simple or as complex as you like. Typically, these templates are set up so that a user can simply plug in values and get immediate results. The Microsoft Office Online templates (discussed earlier in this chapter) are examples of this type of template.

The default workbook and default worksheet templates are discussed in the following sections. Custom workbook templates are discussed later.

Using the workbook template to change workbook defaults

Every new workbook that you create starts out with some default settings. For example, the workbook has one worksheet, the worksheet has gridlines, the page header and footer are blank, text appears in the font defined in the default Normal style, columns are 8.43 units wide, and so on. If you're not happy with any of the default workbook settings, you can change them by creating a workbook template.

Making changes to Excel's default workbook is fairly easy to do, and it can save you lots of time in the long run. Here's how to change Excel's workbook defaults:

  1. Open a new workbook.
  2. Add or delete sheets to give the workbook the number of worksheets that you want.
  3. Make any other changes that you want to make, which can include column widths, named styles, page setup options, and many of the settings that are available in the Excel Options dialog box. To change the default formatting for cells, choose Home ➪ Styles ➪ Cell Styles and then modify the settings for the Normal style. For example, you can change the default font, size, or number format.
  4. When your workbook is set up to your liking, choose FileSave AsBrowse. The Save As dialog box appears.
  5. Select Excel Template (*.xltx) from the Save as Type list. If your template contains VBA macros, select Excel Macro-Enabled Template (*.xltm).
  6. Enter book for the filename.
  7. Save the file in your XLStart folder (not in the Templates folder that Excel proposes).
  8. Close the template file.

After you perform the preceding steps, the new default workbook is based on the book.xltx (or book.xltm) workbook template. You can create a workbook based on your template by using any of these methods:

  • Press Ctrl+N.
  • Open Excel without first selecting a workbook to open. This option works only if you disable the option to show the Start screen when Excel starts. This option is specified in the General tab of the Excel Options dialog box. (Choose File ➪ Options to display the Excel Options dialog box.)

Creating a worksheet template

You can also create a single sheet template named sheet.xltx. Use the same procedure described for book.xltx. The sheet.xltx template is used when you insert a new worksheet.

Editing your template

After you create your book.xltx template, you may discover that you need to change it. You can open the template file and edit it just as you would any other workbook. After you make your changes, save the file to its original location and close it.

Resetting the default workbook

If you create a book.xltx (or book.xltm) file and then decide that you'd rather use the standard default settings, simply delete (or rename) the book.xltx (or book.xltm) template file. Excel then uses its built-in default settings for new workbooks.

Using custom workbook templates

The book.xltx template discussed in the preceding sections is a special type of template that determines default settings for new workbooks. We will now discuss other types of templates, referred to as custom workbook templates, which are simply workbooks that you set up as the basis for new, specific types of workbooks.

Creating custom templates

Creating a custom workbook template can eliminate repeating work. Assume that you create a monthly sales report that consists of your company's sales by region, plus several summary calculations and charts. You can create a template file that consists of everything except the input values. Then when it's time to create your report, you can open a workbook based on the template, fill in the blanks, and be finished.

When you create a workbook that's based on a template, the default workbook name is the template name with a number appended. For example, if you create a new workbook based on a template named Sales Report.xltx, the workbook's default name is Sales Report1.xlsx. The first time you save a workbook created from a template, Excel displays the Save As dialog box so that you can give the workbook a different name if you want to.

A custom template is essentially a normal workbook. 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 the user enters.

Saving your custom templates

To save a workbook as a template, choose File ➪ Save As ➪ Browse and select Excel Template (*.xltx) from the Save as Type drop-down list. If the workbook contains any VBA macros, select Excel Macro-Enabled Template (*.xltm). Save the template in your Templates folder—which Excel automatically suggests—or a folder within that Templates folder.

If you later discover that you want to modify the template, choose File ➪ Open to open and edit the template.

Using custom templates

To create a workbook based on a custom template, choose File ➪ New and then click Personal (above the Search box). You'll see thumbnails of all your custom worksheet templates (plus others). Click a template, and Excel creates a workbook based on the template.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset