LibreOffice Calc Guide 7
LibreOffice Calc Guide 7
Styles
Cell styles
Cell styles are similar to paragraph styles used in LibreOffice Writer and are the most basic type of
style in Calc. Cell styles are used for applying fonts, alignment, borders, background, number
formats (for example, currency, date, number), and cell protection to format the data contained
within the cells.
Page styles
Page styles in Calc are applied to sheets. Although one sheet may print on several pages, only one
page style can be applied to a sheet. If a spreadsheet file contains more than one sheet, then a
different page style can be applied to each sheet. For example, a spreadsheet might contain one
sheet to be printed in landscape orientation and the other sheets in the spreadsheet are printed in
portrait orientation.
Two page styles are supplied with Calc: Default and Report. You can adjust many settings using
page styles and you can also define as many page styles as you require.
Spreadsheets are primarily used onscreen and not printed, therefore Calc does not display the
page style on the screen. If you want a spreadsheet to fit on a certain page size, you have to
carefully control the column width and row height using File > Page Preview and View > Page
breaks preview on the main menu bar to guide you.
Despite this limitation, it is recommended to define page styles for any spreadsheets that you are
likely to print. This will help prevent any lost time or paper wastage due to trial and error.
Page styles allow you to set page size and orientation, page margins, headers and footers, borders
and backgrounds, and the sequence for printing sheets.
2) Click on the Cell Styles icon in the Styles and Formatting dialog to open the list of cell
styles.
3) Highlight the cell or group of cells where you want to apply a cell style.
4) Double-click on the cell style name in the Styles and Formatting dialog and the formatting
attributes for that style are applied to the data contained in the cell or group of cells.
The Styles and Formatting dialog can be docked into the main Calc workspace. To
dock or undock the window, hold down the Ctrl key and double-click on the icon bar
Note at the top of the dialog, or click anywhere in the dialog and use the keyboard
combination Ctrl+Shift+F10.
3) Click on the Fill Format mode icon in the Styles and Formatting dialog and the cursor
changes to a similar shape as the Fill Format Mode icon.
4) Click in each cell where you want to apply the formatting attributes.
5) When you have finished formatting cells, click the Fill Format Mode icon again or close the
Styles and Formatting dialog.
When this mode is active, a right-click anywhere in the document cancels the last
Note Fill Format action. Be careful not to accidentally right-click and thus cancel any
formatting actions you want to keep.
1) Select the sheet to be styled by clicking on its sheet tab at the bottom of the displayed
spreadsheet.
2) Go to Format > Styles and Formatting on the main menu bar, or press the F11 key, or
click the Styles and Formatting icon on the Formatting toolbar to open the Styles and
Formatting dialog (Figure 94).
3) In the Styles and Formatting dialog, click on the Page Styles icon .
4) Double-click on the required page style.
Any new or custom styles apply only to your spreadsheet and are not saved in the
Note template. To save new styles in a template, see Templates on page 137 for more
information.
2) To create a new cell style, click on the Cell Styles icon in the Styles and Formatting
dialog to open the list of cell styles.
3) To create a new page style, click on the Page Styles icon in the Styles and Formatting
dialog to open the list of page styles.
4) Right-click in the Styles and Formatting dialog and select New from the context menu to
open either the Cell Style dialog (Figure 97) or the Page Style dialog (Figure 98).
5) Use the various tabbed pages in the dialogs to set the attributes for your new style. See
Cell style attributes on page 127 and Page style attributes on page 131 for more
information.
6) Click OK to close the dialog and save your new style.
2) To create a new cell style, click on the Cell Styles icon in the Styles and Formatting
dialog to open the list of cell styles.
3) To create a new page style, click on the Page Styles icon in the Styles and Formatting
dialog to open the list of page styles.
4) Select the style you want to use as a base for your new style.
5) Click the New Style from Selection icon to open the Create Style dialog (Figure 99).
6) Type a name for the new style. The list box displays the names of any existing custom
styles used in the spreadsheet.
7) Click OK to save the new style.
8) Right-click on the new style and select Modify from the context menu to open a dialog
where you can change the style attributes. See Cell style attributes on page 127 and
Page style attributes on page 131 for more information.
Style names are case sensitive. You can define, for example, a style called red
Note and another style called Red. Make sure all style names are sufficiently different
to prevent any confusion.
Organizer
Name displays the name of the selected style. If you are creating or modifying a custom
style, enter a name for the style. You cannot change the name of a predefined style.
Linked with select an existing style that you want to base the new style on, or select
none to define your own style.
Category displays the category for the current style. If you are creating or modifying a
new style, select Custom Style from the list. You cannot change the category for a
predefined style.
Contains describes the relevant formatting used in the current style.
Numbers
Category select a category from the list and then select a formatting style in the Format
box.
Format select how you want the contents of the selected cell(s) to be displayed. The
code for the selected option is displayed in the Format Code box.
Font
The changes are applied to the current selection, to the entire word that contains the cursor, or to
the new text that you type. Depending on your language settings, you can change the formatting
for the following font types:
Western text font Latin character sets
Asian text font Chinese, Japanese, or Korean character sets
Complex text layout font right-to-left text direction
To enable support for complex text layout and Asian character sets, go to Tools >
Note Options > Language Settings > Languages and select Enabled.
Font enter the name of an installed font family that you want to use, or select a font from
the list.
Style select the formatting you want to apply: Bold or Italic.
Size enter or select the font size that you want to apply. For scalable fonts, you can also
enter decimal values. If you are creating a style that is based on another style, you can
enter a percentage value or a point value (for example, 2pt or +5pt).
Language sets the language that the spelling checker uses for the selected text or the
text that you type. The spelling checker for the selected language only functions when you
have installed the corresponding language module. A language entry has a check mark in
front of it if the spelling checker is activated for that language.
Preview displays a preview of the current selection.
If you save your document in MS Word format, all of the strikethrough styles are
Note converted to the single line style.
Underlining select the underlining style that you want to apply. To apply the underlining
to words only, select Individual words.
If you apply underlining to a superscript text, the underlining is raised to the level of the
superscript. If the superscript is contained in a word with normal text, the underlining is not
raised.
Underline color select the color for the underlining.
Individual words applies the selected effect only to words and ignores spaces.
Preview displays a preview of the current selection.
Alignment
Text alignment sets the alignment options for the contents of the current cell, or the
selected cells.
Horizontal select the horizontal alignment option that you want to apply to the cell
contents.
Default aligns numbers to the right and text to the left.
Left aligns the contents of the cell to the left.
Right aligns the contents of the cell to the right.
Center horizontally centers the contents of the cell.
Justified aligns the contents of the cell to the left and to the right cell borders.
Filled repeats the cell contents (number and text) until the visible area of the cell is
filled. This feature does not work on text that contains line breaks.
Distributed aligns contents evenly across the whole cell. Unlike Justified, it also
justifies the very last line of text.
Indent indents from the left edge of the cell by the amount that you enter.
Vertical select the vertical alignment option that you want to apply to the cell contents.
Default aligns the cell contents to the bottom of the cell.
Borders
Sets the border attributes for the selected cells.
Line arrangement select a predefined border style to apply. In a spreadsheet, you can
also add or remove predefined borders with the Borders icon on the Table toolbar.
Line select the border style, width, and color that you want to apply. The style is applied
to the borders selected in the preview.
Spacing to contents specify the amount of space that you want to leave between the
border and the contents of the selection.
Left enter the distance between the left border and the contents of the selection.
Right enter the distance between the right border and the contents of the selection.
Top enter the distance between the top border and the contents of the selection.
Bottom enter the distance that between the bottom border and the contents of the
selection.
Synchronize applies the same spacing to contents setting to all four borders when
you enter a new distance.
Shadow style applies a shadow effect to borders. For the best results, only apply this
effect when all four borders are visible. Graphics or objects that are anchored to a frame in
Background
Select a color that you want to use as a background for your selected cells. To remove a
background color, select No Fill.
Cell protection
Hide all hides formulas and contents of the selected cells.
Protected prevents the selected cells from being modified. This cell protection only takes
effect if you also protect the sheet.
Hide formula hides formulas in the selected cells.
Hide when printing prevents the selected cells from being printed.
Organizer
Name displays the name of the selected style. If you are creating or modifying a custom
style, enter a name for the style. You cannot change the name of a predefined style.
Linked with select an existing style that you want to base the new style on, or select
none to define your own style.
Category displays the category for the current style. If you are creating or modifying a
new style, select Custom Style from the list. You cannot change the category for a
predefined style.
Contains describes the relevant formatting used in the current style.
Page
You can define page layouts for single and multiple-page documents, as well as page numbering
and paper formats.
Paper format select from a list of predefined paper sizes, or define a custom paper
format.
Format select a predefined paper size, or create a custom format by entering the
dimensions for the paper in the Height and Width boxes.
Width displays the width of the selected paper format. To define a custom format,
enter a width here.
Height displays the height of the selected paper format. To define a custom format,
enter a height here.
Orientation: Portrait displays and prints the current document with the paper oriented
vertically.
Header
Adds a header to the page style. A header is an area in the top page margin where you can add
text or graphics.
Header on adds a header to the page style.
Same content left/right even and odd pages share the same content. To assign a
different header to even and odd pages, deselect this option and then select Edit.
Left margin enter the amount of space to leave between the left edge of the page and
the left edge of the header.
Right margin enter the amount of space to leave between the right edge of the page and
the right edge of the header.
Footer
Adds a footer to the page style. A footer is an area in the bottom page margin where you can add
text or graphics. See Header above for information on the available options you can use for a
footer.
Sheet
Specifies the elements to be included in the printout of all sheets with the page style. Additionally,
you can set the print order, the first page number, and the page scale.
Page Order defines the order in which data in a sheet is numbered and printed when it
does not fit on one printed page.
Top to bottom, then right prints vertically from the left column to the bottom of the
sheet.
Left to right, then down prints horizontally from the top row of the sheet to the right
column.
First page number select this option if you want the first page to start with a number
other than 1.
Print defines which elements of the spreadsheet are to be printed.
Column and row headers specifies whether you want the column and row headers to
be printed.
Grid prints the borders of the individual cells as a grid. For the view on screen, make
your selection in Tools > Options ->LibreOffice Calc ->View > Grid lines.
Comments prints the comments defined in your spreadsheet. They will be printed on
a separate page along with the corresponding cell reference.
Objects/graphics includes all inserted objects (if printable) and graphics with the
printed document.
Charts prints the charts that have been inserted into your spreadsheet.
Drawing objects includes all drawing objects in the printed document.
Formulas prints the formulas contained in the cells, instead of the results.
Zero values specifies that cells with a zero value are printed.
Scale defines a page scale for the printed spreadsheet.
Scaling mode select a scaling mode from the drop-down list. Appropriate controls will
be shown below this option.
Reduce/enlarge printout specifies a scaling factor to scale all printed pages.
Scaling factor enter a percentage figure for scaling your spreadsheet for printing. The
default setting is 100%.
Modifying styles
1) Go to Format > Styles and Formatting on the main menu bar, or press the F11 key, or
click the Styles and Formatting icon on the Formatting toolbar to open the Styles and
Formatting dialog (Figure 94).
2) To modify a cell style, click on the Cell Styles icon in the Styles and Formatting dialog
to open the list of cell styles.
3) To modify a page style, click on the Page Styles icon in the Styles and Formatting
dialog to open the list of page styles.
4) Right-click on the style name you want to modify and select Modify from the context menu
to open either the Cell Style dialog (Figure 97) or the Page Style dialog (Figure 98).
5) Make the necessary changes to the style attributes. For more information on style
attributes, see Cell style attributes on page 127 and Page style attributes on page 131.
6) Click OK to save the changes and close the dialog.
The Modify command is unavailable if one or more sheets are protected, even if
Note the style to be modified is being used in an unprotected sheet.
Updating styles
Updating styles can only be carried out on cell styles as follows:
1) Go to Format > Styles and Formatting on the main menu bar, or press the F11 key, or
click the Styles and Formatting icon on the Formatting toolbar to open the Styles and
Formatting dialog (Figure 94).
2) Click on the Cell Styles icon in the Styles and Formatting dialog to open the list of cell
styles.
3) Select a cell on the spreadsheet that is using the cell style you want to update and highlight
the data in the cell. The cell style name will be highlighted in the Styles and Formatting
dialog.
4) Make the necessary format changes to the data.
Hiding styles
Hiding styles can only be carried out on cell styles as follows. Only styles that are not being used in
the spreadsheet can be hidden.
1) Go to Format > Styles and Formatting on the main menu bar, or press the F11 key, or
click the Styles and Formatting icon on the Formatting toolbar to open the Styles and
Formatting dialog (Figure 94).
2) Click on the Cell Styles icon in the Styles and Formatting dialog to open the list of cell
styles.
3) Right click on an unused cell style and select Hide from the context menu. The style is then
moved to the Hidden Styles category in the Styles and Formatting dialog.
Showing styles
1) Go to Format > Styles and Formatting on the main menu bar, or press the F11 key, or
click the Styles and Formatting icon on the Formatting toolbar to open the Styles and
Formatting dialog (Figure 94).
2) Click on the drop-down list at the bottom of the Styles and Formatting dialog and select
Hidden Styles from the list.
3) Right click on the hidden style you want to show and select Show from the context menu.
The style will then be displayed in the Styles and Formatting dialog.
Displaying styles
The Styles and Formatting dialog can display different categories of styles as follows:
1) Go to Format > Styles and Formatting on the main menu bar, or press the F11 key, or
click the Styles and Formatting icon on the Formatting toolbar to open the Styles and
Formatting dialog (Figure 94).
2) Click on the drop-down list at the bottom of the Styles and Formatting dialog.
3) Select the style category you want displayed in the Styles and Formatting dialog. The
categories are as follows:
Hierarchical lists the styles used in an outline and normally only applies to documents
that use a hierarchical outline.
All Styles lists all the styles that are available in Calc and in your spreadsheet, except
for Hidden Styles.
Hidden Styles lists all the styles that have been hidden in a spreadsheet.
Applied Styles lists only the styles that have been applied to the spreadsheet.
Custom Styles lists only the styles that you have created for use in a spreadsheet or a
template.
Deleting styles
You can only delete styles that you have created. The styles that are included with LibreOffice as
part of the software installation cannot be deleted.
1) Go to Format > Styles and Formatting on the main menu bar, or press the F11 key, or
click the Styles and Formatting icon on the Formatting toolbar to open the Styles and
Formatting dialog (Figure 94).
2) To delete a cell style, click on the Cell Styles icon in the Styles and Formatting dialog
to open the list of cell styles.
3) To delete a page style, click on the Page Styles icon in the Styles and Formatting
dialog to open the list of page styles.
4) Right-click on the style you want to delete and select Delete from the context menu.
5) Select Yes on the warning message that opens to delete the style. Any data in a cell or a
sheet in the spreadsheet that used the deleted style will revert to the Default style included
with Calc.
Creating templates
Templates are created from a new or existing spreadsheet as follows:
1) Open a new or existing spreadsheet that you want to use as a base for a template.
2) Add any necessary pre-defined content that you want to appear in a spreadsheet each time
you use the new template. For example, company logo and name, company information,
page numbers, and so on.
3) Create all the cell and page styles that you want to use in your new template.
4) Go to File > Save as Template on the main menu bar, or use the keyboard combination
Shift+F11 to open the Template Manager dialog (Figure 101).
5) Double-click to open the folder where you want to save your template or create a new
folder for spreadsheet templates. It is recommended to use the My Templates folder for all
your LibreOffice templates.
6) Click the Save icon and type a memorable name for your template.
7) Click OK to save the new template.
When you create and save a spreadsheet template, it will be automatically saved in
Note the Spreadsheets section in the Template Manager.
Editing templates
1) Go to File > New > Templates on the main menu bar, or click on the Templates button on
the LibreOffice opening dialog to open the Template Manager dialog. By default, the
Template Manager opens in the My Templates folder.
2) Click on the Spreadsheets tab or navigate to the folder where you have saved your
spreadsheet templates.
3) Select the template that you want to edit. When you do this, a row of icons appears above
the templates (see Figure 102).
4) Click the Edit icon and the spreadsheet template opens in Calc.
5) Make all necessary to the template content, cell styles, and page styles just as you would
with a spreadsheet.
6) Go to File > Save on the menu bar to save your changes, or go to File > Save As
Template on the main menu bar to save the edited template as a new template.
3) Select the template you want to use and click on the Open icon , or double-click on the
template to open it. The Template Manager closes and a new spreadsheet opens in Calc.
4) Go to File > Save As on the main menu bar, or use the keyboard combination Ctrl+Shift+S
and save your new spreadsheet with the filename you want to use.
If you select Keep Old Styles, the confirmation message will not appear again the
Note next time you open the spreadsheet using the same changed template.
4) Click on the Set As Default icon . The next time that you create a new spreadsheet, it
will be created from this template.
Resetting the default template back to the Calc default template is only available if the
Note default has been changed previously.
Moving templates
To move a template from one template folder to another template folder:
1) Go to File > New > Templates on the main menu bar to open the Template Manager dialog
(Figure 102).
2) Navigate to the folder containing the template that you want to move to another folder.
3) Select the template you want to move.
4) Click the Move to folder icon and select the folder you want to use from the context
menu. The selected template is moved to the folder.
Deleting templates
You cannot delete templates supplied with LibreOffice. You can only delete templates that you
have created or imported.
1) Go to File > New > Templates on the main menu bar to open the Template Manager dialog
(Figure 102).
2) Select the folder that you want to delete.