Working with Templates

While styles provide a quick way to format cells with a number of cell attributes, you can take your control of the layout and functionality of a spreadsheet even further by creating templates. A template is basically a blank form created in Calc that includes styles, formulas, and functions, and can also provide labels for column and row headings.

All Calc spreadsheets that you create are actually based on a template. The standard template is used when you open a new spreadsheet. The standard template includes all the default Calc toolbars and tools.

You can also create templates that supply custom toolbars (discussed in Chapter 14) and macros (discussed in Chapter 9). This can make the entry or manipulation of data easier on the sheet. So, if you are constantly creating the same spreadsheet for your weekly reports, you may want to create a basic template.

Calc also offers some ready-made templates that you can use to quickly build several different types of spreadsheets. There are templates for car financing, a cash journal, and a home budget, among others.

Note

StarOffice supplies a large number of different templates. Only some of these templates relate to Calc spreadsheets.


Let's take a look at how one of the existing templates works in Calc. Then we will take a look at how to create your own templates.

To Use an Existing Template

The StarOffice built-in templates are launched via the File menu. The templates are actually categorized, making it easier for you to find a template that will serve a particular purpose.

1.
In Calc (or in any StarOffice application), select the File menu, point at New, then select From Template. The New dialog box will appear.

2.
Scroll down in the Categories list to locate the template category you wish to open. For example, you may choose the Financial Documents category (see Figure 7.8).

Figure 7.8. You can select templates by category.


3.
In the Templates list, select the template you wish to use.

4.
To open the template, click OK.

Note

If you wish to see a description of a template, click the More button in the New dialog box.


A new spreadsheet will open based on the template. Figure 7.9 shows the Household Budget template. Note that a template includes formatting and headings that allow you to quickly input data and complete the sheet.

Figure 7.9. Templates provide formatting, formulas, and functions that make it easy to enter the necessary data.


The Household Budget template contains a number of formulas and has been constructed to use several different sheets in the same spreadsheet to collect budget information.

When you complete the data entry on the various sheets, all you have to do is save the spreadsheet. When you click the Save tool, the Save As dialog box will open and you can provide a name and location for the template.

That's another great feature of templates—since the new spreadsheet is based on the template (it is not the template), when you save your spreadsheet, the template is not overwritten; rather, a new spreadsheet is created.

As you peruse the templates provided by StarOffice, you will find that those used by Calc have protected certain cells on some of the spreadsheets, to keep you from overwriting formulas and functions. This is another aspect of templates that is very appealing. Certain areas of a sheet can be protected so no matter who does the data entry, the formulas and other formatting placed in the template are not compromised.

To Create a Template

While you may not have the inclination to create a template as complex as some of those offered by StarOffice, you can create simple templates that include formatting, formulas, and functions (as well as cell protection). These templates can make the “reproduction” of a certain spreadsheet type easier.

Note

Creating your own templates requires that you understand Calc formatting, styles, formulas, functions, and cell protection. You may want to make sure you understand all these necessary features before you try to build your own templates.


1.
Open a new spreadsheet file (Select File, New, Spreadsheet). This new spreadsheet will serve as the blank canvas for the new template.

2.
Enter the row and column headings on the sheet.

3.
Enter the necessary formulas and functions that will be used by the sheet.

4.
Supply any formatting that you wish to use on the sheet. You may want to create styles for the template, so that spreadsheets based on the template can be easily modified by editing a particular style.

5.
Protect any cells (particularly those containing formulas) that you wish to protect from being overwritten when the template is used. Remember to protect the entire sheet if you are going to use cell protection. Figure 7.10 shows a simple template that has been set up to enter quarterly reports. Cells E7:E11 have been protected since they contain the SUM function.

Figure 7.10. Templates are basically spreadsheets without data and contain all the formatting and formulas that will be needed.


6.
Once you have completed your template (which can consist of multiple sheets in the same spreadsheet), you are ready to save the spreadsheet as a template. Select the File menu and then select Save As. The Save As dialog box will appear.

7.
Type in a filename for the template.

8.
Click on the File Type drop-down box and select StarCalc 5.0 Template as the file type.

9.
Since this is a template, it makes sense to save the template with the other templates that StarOffice offers. Locate the folder that holds the StarOffice templates. It is typically C:Office52share emplateEnglish, where C: is the drive on which you installed StarOffice.

10.
If you wish, you can also place the templates in one of the category folders provided (see Figure 7.11).

Figure 7.11. Save your template to one of the category folders provided by StarOffice for templates.


11.
When you have selected the location for the new template, click Save.

The template will be saved to the location that you selected.

To Use Your Template

You can now open your template like any of the templates provided by StarOffice.

1.
In Calc (or in any StarOffice application), select the File menu, point at New, then select From Template. The New dialog box will appear.

2.
Scroll down in the Categories list to locate the category (the name of the category folder that you saved your template in) that holds your custom template.

3.
Select your template (see Figure 7.12).

Figure 7.12. You can select your custom templates that have been saved in the various category folders.


4.
Click OK.

A new spreadsheet will open based on your template. You can fill in the necessary data and then save the spreadsheet as a new file.

If you find that you want to fine-tune a template, you can open the template just as you would any other file. Just make sure to choose StarCalc 5.0 Template as the file type that you wish to locate in the Open dialog box. You can then save the template with any changes that you have made to it.

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

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