LibreOffice Logo

Getting Started Guide 24.8

Chapter 3,
Getting Started with Calc

Using spreadsheets in LibreOffice

Copyright

This document is Copyright © 2024 by the LibreOffice Documentation Team. Contributors are listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0/), version 4.0 or later.

All trademarks within this guide belong to their legitimate owners.

Contributors

To this edition

Robert Thornton, Steve Fanning, Olivier Hallot

To previous editions

Skip Masonsmith, Kees Kriek, Dave Barton, Vasudev Narayanan, Felipe Viggiano, Kees Kriek, Jean Hollis Weber, Steve Fanning, Olivier Hallot, Amanda Labby, Jorge Rodriguez, Paul Figueiredo, B Antonio Fernandez

Feedback

Please direct any comments or suggestions about this document to the Documentation Team’s forum at https://community.documentfoundation.org/c/documentation/loguides/ (registration is required) or send an email to: loguides@community.documentfoundation.org.

Everything you send to a mailing list or forum, including your email address and any other personal information that is written in the message, is publicly archived and cannot be deleted.

Publication date and software version

Published August 2024. Based on LibreOffice 24.8 Community.

Other versions of LibreOffice may differ in appearance and functionality.

Using LibreOffice on macOS

Some keystrokes and menu items are different on macOS from those used in Windows and Linux. The table below gives some common substitutions for the instructions in this book. For a more detailed list, see the application Help.

Windows or Linux

macOS equivalent

Effect

Tools > Options
menu selection

LibreOffice > Preferences

Access setup options

Right-click

Control+click and/or right-click depending on computer setup

Open a context menu

Ctrl (Control)

⌘ (Command)

Used with other keys

Alt

(Option) or Alt, depending on keyboard

Used with other keys

F11

⌘+T

Open Styles deck in Sidebar

What is Calc?

Calc is the spreadsheet component of LibreOffice. You can enter data (usually numerical) in a spreadsheet and then manipulate this data to discover results.

Other features provided by Calc include:

Compatibility with other spreadsheet applications

Wildcards

Simple wildcards such as the asterisk (*), question mark (?), and tilde (~) from other spreadsheet applications are recognized by Calc in formula expressions.

Formula syntax

By default, Calc uses its own formula syntax, referred to as Calc A1, rather than the default Excel A1 syntax used by Microsoft Excel. Calc will translate seamlessly between the two. However, if you are familiar with Excel you may wish to change the default syntax by going to Tools > Options > LibreOffice Calc > Formula and choosing Excel A1 or Excel R1C1 in the Formula syntax drop-down menu.

For more information on formula syntax, see Chapter 8, Using Formulas and Functions, in the Calc Guide.

Macros

Microsoft Office uses Visual Basic for Applications (VBA) code, and LibreOffice uses Basic code based on the LibreOffice API. Although the programming languages are the same, the objects and methods are different and therefore not entirely compatible.

LibreOffice can run some Excel Visual Basic scripts if you enable this feature at Tools > Options > Load/Save > VBA Properties.

If you want to use macros written in Microsoft Excel using the VBA macro code in LibreOffice, you must first edit the code in the LibreOffice Basic IDE editor.

For more information, refer to Chapter 13, Macros, in the Calc Guide.

Functions

For many functions, Calc follows the OpenFormula standard defined in the Recalculated Formula (OpenFormula) Format part of the Open Document Format for Office Applications (OpenDocument) standard, which can be accessed at the OASIS website (https://www.oasis-open.org/). Calc’s general support for OpenFormula leads to a level of inherent compatibility with the function set of any other spreadsheet application that follows the same standard. Note that there are some functions within Calc that are not in accordance with OpenFormula, but many of these are included specifically to improve the exchange of files between Calc and Microsoft Excel.

Spreadsheets, sheets, and cells

Calc uses spreadsheets, which consist of a number of individual sheets. Each sheet contains cells arranged in rows and columns, and each cell is identified by its row number and column letter.

Cells hold the individual elements – text, numbers, formulas, and so on – that make up the data to display and manipulate.

Each spreadsheet can have up to 10,000 sheets, and each sheet can have a maximum of 1,048,576 rows and a maximum of 16,384 columns.

Calc main window

When Calc is started, the main window opens (Figure 1). The parts of this window are described below. You can show or hide many of the parts as desired, using the View menu on the Menu bar.

By default, Calc’s commands are grouped in menus and toolbars, as described in this chapter. In addition, Calc provides other user interface variations, displaying contextual groups of commands and contents. For more information, see Chapter 16, User Interface Variants, in the Calc Guide.

Title bar

The Title bar, located at the top, shows the name of the current spreadsheet. When a spreadsheet is newly created from a template or a blank document, its name is Untitled X, where X is a number. When you save a spreadsheet for the first time, you are prompted to enter a name of your choice.

Menu bar

Under the Title bar is the Menu bar. When you select one of the menu items, a sub-menu drops down to show commands. You can also customize the Menu bar; see Chapter 13, Customizing LibreOffice, for more information.

Most of the menus are similar to those in other components of LibreOffice, although the specific commands and tools may vary. The menus specific to Calc are Sheet and Data; in addition, several important data analysis tools are found in the Tools menu and the View menu contains several options that are of specific interest to Calc users.

Sheet

Commands for handling sheets, including options for inserting and deleting elements; renaming, moving, and copying sheets; changing a sheet tab’s highlight color; and navigating through multiple sheets.

Figure 1: Calc main window

Calc main window

Data

Commands for manipulating and analyzing data, including options for sorting and filtering; defining database ranges; creating pivot tables; defining validity rules; creating subtotals; consolidating; grouping and outlining; and performing various types of statistical analysis.

Tools

Commands for checking and customizing the spreadsheet, including options for spell checking; defining AutoCorrect preferences; applying Goal Seek; using the Solver to solve mathematical equations by goal-seeking methods; using the Detective to investigate dependencies between cells; creating scenarios; sharing and protecting; and using macros.

View

Commands of particular interest to Calc users include Value Highlighting; Column/Row Highlighting; Hidden Row/Column Indicator; and Show Formula.

Toolbars

In a default LibreOffice installation, the top toolbar under the Menu bar is called the Standard toolbar. It is consistent across all LibreOffice applications. For more information about toolbars, see Chapter 1, LibreOffice Basics.

Formula bar

The Formula bar (Figure 2) is located at the top of the cell grid in the Calc workspace. It is permanently docked in this position and cannot be used as a floating toolbar. However, it can be hidden or made visible by going to View > Formula Bar on the Menu bar.

Figure 2: Formula bar

Formula bar

From left to right, the Formula bar includes the following:

Name Box

Displays the current active cell reference using a combination of a letter and a number, for example A1. The letter indicates the column and the number indicates the row of the selected cell. If you have selected a range of cells that is also a named range, the name of the range is shown in this box. You can also jump to a specific cell by typing a cell reference in the Name Box. If you type the name of a named range and press the Enter key, the named range is selected and displayed.

Function Wizard

Opens a dialog from which you can search through lists of available functions. This can be very useful because it also shows how the functions are formatted.

Select Function

This drop-down list provides the options shown in Figure 3 to perform calculations on cells containing numbers.

Figure 3: Select Function drop-down

Select Function drop-down

Formula

Inserts an equals (=) sign into the selected cell and the Input line, allowing a formula to be entered. The Name Box now displays a drop-down list of the most frequently used functions, for a quick access to the function name and syntax.

Input line

Displays the contents of the selected cell (data, formula, or function) and allows you to edit the cell contents. To turn it into a multi-line input area for very long formulas, click the down arrow on the right-hand side of the Input line.

You can also directly edit the contents of a cell by double-clicking on the cell. When you enter or edit data in a cell, the Select Function and Formula icons change to Cancel and Accept icons.

In a spreadsheet, the term “function” covers much more than just mathematical functions. See Chapter 8, Using Formulas and Functions, in the Calc Guide for more information.

Status bar

The Status bar (Figure 4) provides information about the spreadsheet as well as quick and convenient ways to change some of its features. Most of the fields are similar to those in other components of LibreOffice. See Chapter 1, LibreOffice Basics, for more information.

Figure 4: Status bar

Status bar

  1. Save/Unsaved changes

  1. Sheet number

  1. Cell selection information

  1. Page Style

  1. Text Languages

  1. Insert/Overwrite mode

  1. Selection mode

  1. Digital Signature

  1. Cell/Object information

  1. Zoom slider

  1. Zoom percentage

The Status bar can allow you to do quick math operations on selected cells. You can view the calculated average and sum, count of elements, and more on the selection by right-clicking over the Cell/Object Information area and selecting the operations you want to display in the Status bar (Figure 5).

Figure 5: Selecting math operations on Status bar

Selecting math operations on Status bar

Sidebar

The Sidebar (View > Sidebar or Ctrl+F5) is located on the right-hand side of the window. It is similar to the Sidebar in Writer (shown in Chapter 1 and Chapter 2 of this book) and consists of five decks: Properties, Styles, Gallery, Navigator, and Functions. Each deck has a corresponding icon on the Tab panel on the right-hand side of the Sidebar, allowing you to switch between them. The decks are described below.

Properties

With a cell selected, this deck includes five content panels. Each of these panels has a More Options button that opens a dialog with additional options. These dialogs lock the spreadsheet for editing until they are closed.

Style: Options for applying, creating, and updating cell styles.

Character: Options for formatting the text, such as font name, size, weight, and color. Some controls, such as superscript, become active only when the text cursor is active in the Input line of the Formula bar or the cell. A font is temporarily applied on selected cells when hovering or navigating in the Font Name list.

Number Format: Options for formatting numbers, including decimals, percentages, currency, and dates. Covers decimal places, leading zeroes, coloring negative numbers, and displaying thousands separators.

Alignment: Options for arranging the text in various ways, including horizontal and vertical alignment, wrapping, indenting, orientation, and vertical stacking. Also provides for cell merging.

Cell Appearance: Options for controlling the appearance of cells, including background color and border formats.

The set of panels displayed in this deck depends on the type of object that is currently selected. For example, with a chart selected, the Properties deck contains Line, Position and Size, Area, and Shadow panels. Not all panels in the Properties deck provide a More Options button.

Styles, Gallery, Navigator

These decks are similar to those in Writer. Their use is described in the Calc Guide. Note that Calc supports three style types – cell styles, page styles, and drawing styles.

Functions

This deck contains a searchable list of functions organized by category. It is a simpler version of the Function Wizard, which is opened by selecting Insert > Function on the Menu bar, clicking the Function Wizard icon on the Formula bar, or pressing Ctrl+F2.

Spreadsheet layout

Individual cells

The main section of the Calc workspace displays the cells in the form of a grid. Each cell is formed by the intersection of one column and one row in the spreadsheet.

At the top of the columns and the left of the rows are a series of header boxes containing letters and numbers. The column headers use alphabetic characters beginning at A and go on to the right (to column XFD). The row headers use numerical characters starting at 1 and go down.

These column and row headers form the cell references that appear in the Name Box on the Formula bar (Figure 2). If the headers are not visible on the spreadsheet, choose View > View Headers on the Menu bar.

When the mouse pointer lies over the grid of cells, the system default pointer is normally shown (typically an arrow pointer). However, a configuration option is available to switch to using the pointer shape defined in the icon theme (typically a fat cross). For more information, see Chapter 15, Setting up and Customizing, in the Calc Guide.

The active cell is always indicated by highlighting its corresponding column and row header cells. An option is available to highlight the entire row and column of the active cell using a transparent color. This is enabled/disabled using the Tools > Options > LibreOffice Calc > View > Column/Row highlighting and View > Column/Row Highlighting options on the Menu bar.

Sheet tabs

Each Calc spreadsheet can contain multiple sheets, which are displayed as tabs at the bottom of the spreadsheet window. By default, each new spreadsheet is created with one sheet named Sheet1 and you can create additional sheets as needed. The tab for the active sheet is highlighted and you can select multiple sheets by holding down the Ctrl key while clicking on the sheet tabs.

To change the default name for a sheet (Sheet1, Sheet2, and so on), right-click on a sheet tab and select Rename Sheet in the context menu, to open the Rename Sheet dialog where you can type a new name for the sheet. You can also access the Rename Sheet dialog by double-clicking on the sheet tab or going to Sheet > Rename Sheet on the Menu bar.

To change the color of a sheet tab, right-click on the tab and select Tab Color in the context menu to open the Tab Color dialog. Select a color and click OK. You can also access the Tab Color dialog by going to Sheet > Sheet Tab Color on the Menu bar. To add new colors to this color palette, see Chapter 13, Customizing LibreOffice.

Opening and importing a CSV file

A comma-separated values (CSV) file contains data in tabular format. In many cases, CSV files contain data exported from a database, resulting in a file in which each line corresponds to a record from a table or query. You can import such data into Calc for futher analysis and charting. A CSV file stores data in a text format, separating values with a specific delimiter character. The delimiter is often a comma but may be a semicolon, a vertical bar, or any other character. Before you open a CSV file in Calc, make sure you know which character is the delimiter. Each line in a CSV file represents a row in a spreadsheet.

To open a CSV file in Calc:

  1. Choose File > Open on the Menu bar, click the Open icon on the Standard toolbar, or press Ctrl+O, and then locate the CSV file. Most CSV files have the extension .csv but some CSV files may have a .txt extension.

  2. Select the file and click Open.

  3. On the Text Import dialog (Figure 6), select the required options for importing the CSV file into the Calc spreadsheet. For details about these options, see Chapter 1, Introduction, in the Calc Guide.

Figure 6: Text Import dialog

Text Import dialog

CSV files from different sources may adopt various formats. As you select and deselect options in the upper part of the Text Import dialog, use the preview area in the lower part of the dialog to verify that the layout of the imported data is as expected.

  1. Click OK to import the file.

Know how your CSV file is formatted before you open it in Calc. Not knowing how the CSV is structured is a source for errors and miscalculations.

Saving spreadsheets

For information on how to save files manually or automatically, see Chapter 1, LibreOffice Basics. Calc can save spreadsheets in a range of formats and also export spreadsheets to PDF and XHTML file formats or JPEG, PNG, and WEBP image formats; see Chapter 7, Printing, Exporting, Emailing, and Signing, in the Calc Guide for more information.

Saving files in different formats

You can save a spreadsheet in another format:

  1. Save the spreadsheet in Calc spreadsheet file format (*.ods).

  2. Select File > Save As on the Menu bar to open the Save As dialog. You can also open this dialog by pressing the Ctrl+Shift+S keyboard shortcut, or by clicking the arrowhead icon to the right of the Save icon on the Standard toolbar and selecting Save As in the drop-down menu.

  3. Select the folder where you want to save the file.

  4. In the File name field, enter a new file name for the spreadsheet.

  5. In the Save as type drop-down list, select the type of spreadsheet format you want to use.

  6. If Automatic file name extension is present and selected, the correct file extension for the spreadsheet format you have selected will be added to the file name.

  7. Click Save.

When a spreadsheet file is saved in a format other than .ods, by default the Confirm File Format dialog opens (Figure 7). Click Use [xxx] Format to continue saving in your selected spreadsheet format or click Use ODF Format to save the spreadsheet in Calc .ods format. If you uncheck Ask when not saving in ODF or default format, this dialog no longer appears when saving in another format (the same option can also be found at Tools > Options > Load/Save > General > Warn when not saving in ODF or default format).

Figure 7: Confirm File Format dialog

Confirm File Format dialog

If you select Text CSV (*.csv) format for your spreadsheet, the Export Text File dialog (Figure 8) opens. Here you can set the CSV format for your file, including the character set, the field delimiter, and the string (text) delimiter.

Figure 8: Export Text File dialog for CSV files

Export Text File dialog for CSV files

Once you have saved a spreadsheet in another format, all changes you make to the spreadsheet will be in that format. If you want to go back to working with a *.ods version, you must save the file as a *.ods file.

To have Calc save spreadsheets by default in a file format other than .ods, go to Tools > Options > Load/Save > General. In the Default File Format and ODF Settings area, select Spreadsheets (Calc) in Document type, then in Always save as, select your preferred file format.

Exporting values and formulas as a CSV file

Calc can export raw data and calculated data into a CSV file. Figure 9 contains an example of data for export, and Figure 10 shows the resulting CSV file.

The steps to export are:

  1. Save the spreadsheet in Calc spreadsheet file format (*.ods), for backup purposes.

  2. Select the sheet to be written as a CSV file.

  3. Go to View > Formula on the Menu bar. Alternatively, go to Tools > Options > LibreOffice Calc > View on the Menu bar, check the Formulas option in the Display area, and click OK.

  4. Select File > Save As on the Menu bar to open the Save As dialog. You can also open this dialog by pressing the Ctrl+Shift+S keyboard shortcut, or by clicking the arrowhead icon to the right of the Save icon on the Standard toolbar and selecting Save As in the drop-down menu.

  5. Select the folder where you want to save the file.

  6. In the File name field, enter a new file name for the CSV file.

  7. In the Save as type drop-down list, select Text CSV (*.csv).

  8. If Automatic file name extension is present and selected, the correct file extension for the spreadsheet format you have selected will be added to the file name.

  9. Click Save.

  10. From the Export Text File dialog (Figure 8) that appears, select the required options, and click OK.

Figure 9: Exporting raw and calculated values

Exporting raw and calculated values

Figure 10: CSV file containing raw and calculated values

CSV file containing raw and calculated values

Exporting contents as an image

If you need to export a range selection or a selected group of shapes (images) into a graphics format, do the following

  1. Select the cell range or the group of shapes, then select File > Export.

  2. In the Export dialog, type a name for the image, select the graphics file format (PNG, JPG, or WEBP), and mark the Selection checkbox.

  3. Click Save.

If necessary, Calc may give you additional options to configure the settings associated with the graphics format.

Exporting a whole sheet as one page

If you need to view an entire sheet, Calc can export a sheet as a PDF in one page.

The steps to export the contents to one page:

  1. On the Menu bar, select File > Export as PDF.

  2. On the General tab of the PDF Options dialog (Figure 11), select the option Whole sheet export.

  3. Click the Export button, and choose a location for the PDF.

Figure 11: Exporting sheets to PDF as one page

Exporting sheets to PDF as one page

Importing external data – Web Query

Calc can import data from HTML linking to an external data source with web query. You can filter or choose the table to import by HTML caption:

  1. Position the cursor in the cell where you want the new content to be imported.

  2. Choose Sheet > External Links to open the External Data dialog (Figure 12).

  3. Enter the URL of the HTML document or the name of the spreadsheet, then press Enter. You can also click the Browse button to open a file selection dialog.

  4. In the Available Tables/Ranges list box, select the named ranges or tables you want to insert. You can also specify that the ranges or tables can be updated every n seconds. These tables are now listed in the order they appear in the source. Click OK to finish.

Figure 12: Link to external data

Link to external data

Navigating within spreadsheets

Calc provides many ways to navigate within a spreadsheet, including methods for moving from cell to cell and sheet to sheet.

Cell navigation

When a cell is selected or in focus, a colored rectangle is drawn around the cell. When a group of cells is selected, the background of the cell area is colored. The colors depend on the operating system being used and how you have set up LibreOffice.

Mouse: Place the mouse pointer over the cell and click the left mouse button.

Cell reference: Delete the existing cell reference in the Name Box on the Formula bar (Figure 2). Type the new cell reference and press Enter. Cell references are case-insensitive.

Navigator: Open the Navigator (Figure 13) by pressing F5 or going to View > Navigator on the Menu bar. Type the cell reference into the Column and Row fields, or use the adjacent increment / decrement buttons, and press Enter. Equivalent interactions are available on the Navigation deck of the Sidebar.

Enter key: By default, moves the cell focus down in a column to the next row. Shift+Enter moves the focus up in a column to the previous row. You can change the action of the Enter key; see “Customizing the Enter keybelow.

Tab key: Moves the cell focus right in a row to the next column. Shift+Tab moves the focus to the left in a row to the previous column.

Arrow keys: Use these keys to move the cell focus in the direction of the arrow pressed.

Home, End, Page Up, and Page Down keys:

Figure 13: Calc Navigator

Calc Navigator

Sheet navigation

Each sheet in a spreadsheet is independent of the other sheets, though references can create links between one sheet to another. To navigate between sheets in a spreadsheet:

Navigator – double-click on any of the sheets listed in the Navigator to select that sheet.

KeyboardCtrl+Page Down moves one sheet to the right and Ctrl+Page Up moves one sheet to the left. Ctrl+Tab is equivalent to Ctrl+Page Down, while Ctrl+Shift+Tab is equivalent to Ctrl+Page Up. These interactions operate in a cyclic manner. For example, if currently on the first sheet tab, then Ctrl+Page Up moves to the last sheet tab.

Mouse – click on a sheet tab at the bottom of the spreadsheet to select that sheet.

Menu – go to Sheet > Navigate > To Previous Sheet / To Next Sheet on the Menu bar to navigate to previous or next sheet. These interactions operate in the same cyclic manner as described above for their equivalent keyboard shortcuts. Sheet > Navigate > Go to Sheet brings up a dialog box that allows you to select a sheet or to search for a sheet by name.

If your spreadsheet contains multiple sheets, then some of the sheet tabs may be hidden. If this is the case:

Figure 14: Navigating sheet tabs

Navigating sheet tabs

Figure 15: Right-click any active arrow button

Right-click any active arrow button

When you insert a new sheet into a spreadsheet, Calc automatically uses the next number in the numeric sequence to construct a name. To improve navigation, rename sheets in a spreadsheet to make them more recognizable.

Keyboard navigation

You can navigate a spreadsheet using the keyboard, by pressing a key or a combination of keys. See Chapter 1, Introduction, and Appendix A, Keyboard Shortcuts, in the Calc Guide for the keys and key combinations you can use for spreadsheet navigation in Calc.

Customizing the Enter key

You can customize the behavior of the Enter key by going to Tools > Options > LibreOffice Calc > General on the Menu bar and using the upper three options in the Input Settings area (Figure 16).

Figure 16: Customizing the Enter key

Customizing the Enter key

Selecting items in a spreadsheet

Selecting cells

Single cell

Click in the cell. You can verify your selection by looking in the Name Box on the Formula bar (Figure 2).

Range of contiguous cells

A range of cells can be selected using the keyboard or the mouse.

To select a range of cells with the mouse:

  1. Click in a cell.

  2. Press and hold down the left mouse button.

  3. Move the mouse to highlight the desired block of cells, then release the mouse button.

To select a range of cells using the mouse, but without dragging:

  1. Click in the cell at one corner of the range of cells.

  2. Hold down the Shift key and click in the opposite corner cell of the block of cells.

You can choose a contiguous range of cells by clicking the Selection mode area on the Status bar (Figure 4) and selecting Extending selection before clicking in the opposite corner of the range of cells. Once you are done, make sure to change back to Standard selection or you may extend a cell selection unintentionally.

To select a range of cells using the keyboard:

  1. Click in the cell at one corner of the range of cells.

  2. While holding down the Shift key, use the cursor arrows to select the rest of the range.

You can also directly select a range of cells using the Name Box. Click in the Name Box on the Formula bar (Figure 2). Enter the cell reference for the upper left-hand cell, followed by a colon (:), and then the lower right-hand cell reference. For example, to select the range that would go from A3 to C6, you would enter A3:C6.

Range of non-contiguous cells

To select a range of non-contiguous cells using the mouse:

  1. Select the first cell or range of cells using one of the methods described in the previous paragraphs.

  2. Move the cursor to the start of the next range or single cell.

  3. Hold down the Ctrl key and click or click-and-drag to select another range of cells to add to the first range.

  4. Repeat as necessary.

You can choose non-contiguous ranges of cells by clicking the Selection mode area on the Status bar (Figure 4) and selecting Adding selection. Click or click-and-drag to select ranges of cells to add to the selection.

Selecting columns and rows

Single column or row

To select a single column, click on the column header (Figure 1). To select a single row, click on the row header.

Multiple columns or rows

To select multiple columns or rows that are contiguous:

  1. Click on the header of the first column or row in the group.

  2. Hold down the Shift key.

  3. Click on the header of the last column or row in the group.

To select multiple columns or rows that are not contiguous:

  1. Click on the header of the first column or row in the group.

  2. Hold down the Ctrl key.

  3. Click on the headers of all subsequent columns or rows while holding down the Ctrl key.

You can also select rows and columns using options in the Edit > Select menu on the Menu bar (Select Row, Select Column, Select Visible Rows Only, and Select Visible Columns Only).

Entire sheet

To select the entire sheet, click on the blank rectangular area to the left of the column headers and above the row headers (Figure 17). Alternatively you can press Ctrl+A, press Ctrl+Shift+Space, or go to Edit > Select All on the Menu bar.

Figure 17: Select All box

Select All box

Selecting sheets

If you want to make changes to many sheets at once you can select one or multiple sheets in Calc.

Single sheet

Click on the sheet tab for the sheet you want to select. The tab for the selected sheet changes appearance – in the default Calc setup, the tab background color changes to white, the text on the tab changes to bold, and a colored line is drawn along the bottom edge of the tab.

Multiple contiguous sheets

To select multiple contiguous sheets:

  1. Click on the sheet tab for the first desired sheet.

  2. Hold down the Shift key and click on the sheet tab for the last desired sheet.

  3. All tabs between these two selections will change appearance. Any actions that you perform will now affect all the highlighted sheets.

Multiple non-contiguous sheets

To select multiple non-contiguous sheets:

  1. Click on the sheet tab for the first desired sheet.

  2. Hold down the Ctrl key and click on the sheet tab for the each additional desired sheet.

  3. The selected tabs will change appearance. Any actions that you perform will now affect all the highlighted sheets.

All sheets

Right-click a sheet tab and choose Select All Sheets in the context menu, or select Edit > Select > Select All Sheets on the Menu bar.

You can also select sheets using the Select Sheets dialog, accessed by selecting Edit > Select > Select Sheets on the Menu bar.

Working with columns and rows

Inserting columns and rows

Single column or row

Using the Sheet menu:

  1. Select the cell location where you want the new column or row inserted.

  2. Go to Sheet on the Menu bar and select either Insert Columns > Columns Before, Insert Columns > Columns After, Insert Rows > Rows Above, or Insert Rows > Rows Below.

Using row and column headers:

  1. Right-click the column or row header where you want the new column or row inserted.

  2. Select Insert Columns Before, Insert Columns After, Insert Rows Above, or Insert Rows Below in the context menu.

Multiple columns or rows

To insert multiple columns or rows at once:

  1. Highlight the required number of columns or rows by holding down the left mouse button on the first one and then dragging across the required number of identifiers.

  2. Proceed as for inserting a single column or row above.

Hiding and showing columns and rows

To hide columns or rows:

  1. Select cells in the rows or columns you want to hide.

  2. Go to Format on the Menu bar, select Rows or Columns, and select Hide in the submenu. Alternatively, right-click on selected row or column headers and select Hide Rows or Hide Columns in the context menu.

To show hidden columns or rows:

  1. Select cells in the rows or columns on each side of the hidden rows or columns.

  2. Go to Format on the Menu bar, select Rows or Columns, and select Show in the submenu. Alternatively, right-click on selected row or column headers and select Show Rows or Show Columns in the context menu.

To see an indicator for hidden columns and rows, enable the View > Hidden Row/Column Indicator option on the Menu bar.

Deleting columns or rows

To delete multiple columns or rows, do one of the following:

Deleting cells

  1. Select the cells you want to delete. Choose the Sheet > Delete Cells command, press Ctrl+-, or right-click on a cell and select Delete in the context menu.

  2. When the Delete Cells dialog (Figure 18) appears, select the appropriate option and click OK.

Figure 18: Delete Cells dialog

Delete Cells dialog

Working with sheets

Inserting new sheets

If you need to insert a new sheet after the last sheet in a spreadsheet without opening the Insert Sheet dialog, click the Add Sheet (+) icon next to the sheet tabs. After clicking on the icon, the the new sheet appears with an automatically allocated name.

The Insert Sheet dialog (Figure 19) provides greater flexibility and is accessed by one of the following methods:

Figure 19: Insert Sheet dialog

Insert Sheet dialog

The Insert Sheet dialog is used to position the new sheet, create multiple sheets, name the new sheet, or select a file containing the data to be inserted into the new sheet.

Moving and copying sheets

You can move a sheet to a different position within the same spreadsheet, by clicking on the sheet’s tab and dragging it to a new position before releasing the mouse button. You can copy a sheet within the same spreadsheet, by holding down the Ctrl key, clicking on the sheet tab, and dragging it to its required position before releasing the mouse button. You can also copy a sheet by right-clicking the sheet’s tab and selecting Duplicate Sheet in the context menu, or by going to Sheet > Duplicate Sheet on the Menu bar.

The Move/Copy Sheet dialog (Figure 20) provides greater flexibility and, in particular, allows you to move or copy a sheet into a different spreadsheet.

  1. To access the Move/Copy Sheet dialog, right-click on the sheet tab you wish to move or copy and then select Move or Copy Sheet in the context menu, or go to Sheet > Move or Copy Sheet on the Menu bar.

  2. In the Action area, select Move to move the sheet or Copy to copy the sheet.

  3. Select the spreadsheet where you want the sheet to be placed in the To document drop-down list.

  4. In the Insert before list, choose the position in the target spreadsheet where you want to place the sheet.

  5. Enter a name in the New name box if you want to rename the sheet after it is moved or copied. If you do not enter a name, Calc automatically generates one.

  6. Click Move or Copy to confirm the move or copy and close the dialog.

Figure 20: Move/Copy Sheet dialog

Move/Copy Sheet dialog

When you move or copy a sheet to another spreadsheet, a conflict may occur with formulas linked to other sheets in the previous location.

Hiding and showing sheets

If you need to hide one or more sheets, first select the sheets. Then right-click on one of the selected sheet tabs and select Hide Sheet in the context menu, or go to Sheet > Hide Sheet on the Menu bar. It is not possible to hide the last visible sheet.

To display hidden sheets, right-click on any sheet tab and select Show Sheet in the context menu, or go to Sheet > Show Sheet on the Menu bar. Calc displays the Show Sheet dialog, listing all hidden sheets. Select the hidden sheets to be displayed again and then click OK.

It is also possible to hide and show elements within a sheet, as described in various chapters of the Calc Guide.

Renaming sheets

Every time a new sheet is created without specifying a name, it is automatically named SheetX (where X is an incrementing number allocated by Calc). The first sheet in a new spreadsheet is named Sheet1.

A sheet can be renamed using one of the following methods:

Sheet names can contain almost any character. Some naming restrictions apply, the following characters are not allowed in sheet names: colon (:), back slash (\), forward slash (/), question mark (?), asterisk (*), left square bracket ([), or right square bracket (]). In addition a single quote (‘) cannot be used as the first or last character of the name. Attempting to rename a sheet with an invalid name will produce an error message.

Deleting sheets

To delete one or more sheets, first select the sheets (see “Selecting sheetsabove). Then right-click on one of the selected sheet tabs and select Delete Sheet in the context menu, or go to Sheet > Delete Sheet on the Menu bar. If any of the selected sheets is not empty, then Calc displays a confirmation dialog stating the number of sheets to be deleted. Click Yes to confirm the deletion. It is not possible to delete all the sheets in a spreadsheet.

Viewing a spreadsheet

Changing document view

Use the zoom function (View > Zoom) to show more or fewer cells in the window when you are working on a spreadsheet. For more about zoom, see Chapter 1, LibreOffice Basics.

Freezing rows and columns

If you have long rows or columns of data that extend beyond the viewable area of the sheet, you can freeze selected rows or columns. In this way you can lock rows across the top of a sheet or lock columns down the left of a sheet, so that the frozen data remains displayed as you scroll through the rest of the data. Vertical scrolling does not affect the visibility of data in a frozen row; horizontal scrolling does not affect the visibility of data in a frozen column.

The sheet shown in Figure 21, has frozen rows and columns, which are outlined by heavy lines. Columns A through F and rows 1 through 3 are frozen. The rows between 3 and 23 and the columns between F and Q are scrolled off the page.

Figure 21: Frozen rows and columns

Frozen rows and columns

To freeze the first column in a sheet go to View > Freeze Cells > Freeze First Column on the Menu bar, or click the down arrow to the right of the Freeze Rows and Column icon on the Standard toolbar and select Freeze First Column in the drop-down menu.

To freeze the first row in a sheet go to View > Freeze Cells > Freeze First Row on the Menu bar, or click the down arrow to the right of the Freeze Rows and Column icon on the Standard toolbar and select Freeze First Row in the drop-down menu.

To freeze either a set of rows or a set of columns (single or multiple):

  1. Click on the header of the row below all the rows you want to freeze, or click on the header of the column to the right of all the columns you want the freeze.

  2. Right-click on the header and select Freeze Rows and Columns in the context menu, or go to View > Freeze Rows and Columns on the Menu bar, or click the Freeze Rows and Columns icon on the Standard toolbar.

To freeze both a set of rows and a set of columns (single or multiple):

  1. Click in the cell that is immediately below the rows you want to freeze and immediately to the right of the columns you want frozen.

  2. Choose View > Freeze Rows and Columns on the Menu bar, or click the Freeze Rows and Columns icon on the Standard toolbar.

Unfreezing

To unfreeze all rows and columns that are currently frozen, do one of the following:

The heavy lines that indicate frozen rows and columns will disappear.

Splitting the screen

Calc allows you to view different areas of a sheet simultaneously by splitting the screen into separate sections. Each section provides you with a view of one part of the sheet. This feature is also known as “splitting the window.” The screen can be split horizontally, vertically, or both at once (which would give you up to four sections of the sheet in view at one time). Figure 22 provides an example of a sheet split horizontally into two sections, with the split indicated by the gray separator line located between rows 2 and 7.

This feature is especially useful when a large spreadsheet has one cell containing data that is used by three formulas in different cells. When you the split the screen, you can position the cell containing the number in one section of the view and the cells with formulas in other sections. This makes it easy to see how changing the number in one cell affects each of the formulas.

Figure 22: Split screen example

Split screen example

Splitting horizontally or vertically

There are two methods to split a screen either horizontally or vertically. In these cases, you can scroll through each section independently of the other. A horizontal or vertical separator line appears indicating where the split has been placed.

Method 1

Method 2

Splitting horizontally and vertically

There are two methods to split a screen both horizontally and vertically at the same time. Horizontal and vertical separator lines appear indicating where the split has been placed.

Method 1

Method 2

Figure 23: Split screen bars

Split screen bars

Removing split views

To remove a split view, do one of the following:

Entering data using the keyboard

Most data entry in Calc is done with the keyboard.

Numbers

Click in the cell and type the number using the number keys on either the main keyboard or the numeric keypad. By default, Calc right-aligns the numbers in a cell.

Negative numbers

To enter a negative number, either type a minus (–) sign in front of the number or enclose the number in parentheses(1234). The negative number will be displayed as follows: –1234.

Leading zeroes

If a number is entered with leading zeroes (for example, 01481), Calc will drop the leading zeroes by default. To retain a minimum number of characters in a cell when entering numbers and retain the number format, for example 1234 and 0012, use one of two methods to add leading zeroes:

Method 1

  1. Select the cell that will retain leading zeroes, then access the Format Cells dialog (Figure 24) by doing one of the following:

  1. Select the Numbers tab and select Number in the Category list.

  2. In the Options area, set the Leading zeroes field to the maximum number of zeroes to display in front of the integer part of the number. If you want to display numbers with four integer digits, enter the value 4. Then any number containing less than four integer digits will have leading zeroes added – for example 12 is displayed as 0012.

Figure 24: Format Cells dialog – Numbers tab

Format Cells dialog – Numbers tab

  1. Click OK. The number in the selected cell retains its number format and any formula used in the spreadsheet will treat the entry as a number in formula functions.

Method 2

  1. Select the cell.

  2. On the Sidebar, go to the Properties deck.

  1. On the Number Format panel (Figure 25), select Number in the drop-down list, and enter the maximum number of zeroes to display in front of the integer part of a number in the Leading zeroes box. Formatting is applied immediately.

Figure 25: Set leading zeroes in Sidebar

Set leading zeroes in Sidebar

To format numbers with decimal places and prevent a leading zero (for example, “.019” instead of “0.019”), go to the Format code box on the Numbers tab of the Format Cells dialog and then type a period or full stop and add one or more question marks (“?”). Each question mark represents a decimal place. For example, for 3 decimal places, type one period and three question marks [.???] and click OK. Any number with only decimal places will then have no leading zero.

If a numeric value does not need to be treated as a number in calculations (for example when entering a zip code), you can type an apostrophe (') before the number, for example “'01481”. When you move the cell focus, the apostrophe is hidden, any leading zeroes are retained, and the number is converted to left-aligned text.

Numbers as text

Numbers can also be entered as text using one of the following methods:

Method 1

  1. Select the cell which contains the number, then access the Format Cells dialog (Figure 24).

  2. Make sure the Numbers tab is selected, then select Text in the Category list.

  3. Click OK. The number is converted to text and, by default, left-aligned.

Method 2

  1. Select the cell.

  2. On the Sidebar, go to the Properties deck.

  3. On the Number Format panel (Figure 25), select Text in the drop-down list. Formatting is applied to the cell immediately.

You can change how Calc converts strings to numeric values, cell references, dates, and times by going to Tools > Options > LibreOffice Calc > Formula. In the Detailed Calculation Settings area, select Custom (conversion of text to numbers and more). Click the Details button, and then select the proper treatment in the Detailed Calculation Settings dialog. See the system help for more information.

Text

To enter text in a cell, click in the cell and type. By default, text is left-aligned in a cell. Cells can contain several lines of text. If you want to use paragraphs, press Ctrl+Enter to create another paragraph.

If you are entering several lines of text, extend the Input line by clicking on the Expand Formula Bar icon, which is located on the right-hand end of the Formula bar, and then the Input line becomes multi-line. Click the icon again to return the Input line to its single line height.

Date and time

Select the cell and type the date or time. You can separate the date elements with a slash (/) or a hyphen (–), or use text, for example 10 Oct 2020. The date format automatically changes to the selected format used by Calc.

Tools > Options > Languages and Locales > General > Formats > Date acceptance patterns defines the date patterns that will be recognized by Calc. In addition, every locale accepts input in an ISO 8601 YYYY-MM-DD pattern (for example, 2020-07-26).

When entering a time, separate time elements with colons (for example, 10:43:45) and the time format automatically changes to the selected format used by Calc.

To change the date or time format used by Calc:

  1. With the cell selected, open the Format Cells dialog (Figure 24).

  2. Make sure the Numbers tab is selected, then select Date or Time in the Category list.

  3. Select the date or time format you want to use in the Format list.

  4. Click OK.

Cell fields

If you wish to insert a date, the sheet name, or the document name in a cell as a field, do the following:

  1. Select a cell and double-click to activate edit mode.

  2. Right-click and select Insert Field > Date, Sheet Name, or Document Title in the context menu. The Insert Field sub-menu contains two Date options – use the occurrence located directly above the Sheet Name item. Alternatively you can go to Insert > Field > Date, Sheet Name, or Document Title on the Menu bar.

  3. The fields are updated with the latest information when the spreadsheet is saved or recalculated using the Ctrl+Shift+F9 shortcut or going to Data > Calculate > Recalculate Hard on the Menu bar.

The other Insert Field > Date option and its associated Time option in the context menu insert the current date and time respectively. However, unlike the commands described above, these values are not inserted as fields and will not be updated or recalculated later. Similarly, the Insert > Date and Insert > Time options on the Menu bar do not insert values as fields.

The Document Title commands insert the name of the spreadsheet. They do not insert the title defined on the Description tab of the Properties dialog for the file.

AutoCorrect Options

Calc automatically applies many changes during data input using AutoCorrect, unless you have deactivated any AutoCorrect changes. For more information, refer to Chapter 2, Entering and Editing Data, in the Calc Guide. You can also undo any AutoCorrect changes by using Edit > Undo on the Menu bar, pressing the keyboard shortcut Ctrl+Z, or manually by going back to the change and replacing the automatic correction with what you want.

To change how AutoCorrect works, go to Tools > AutoCorrect Options on the Menu bar to display the AutoCorrect dialog (Figure 26):

Figure 26: AutoCorrect dialog

AutoCorrect dialog

Replace tab

Edit the replacement table for automatically correcting or replacing words or abbreviations.

Exceptions tab

Specify the abbreviations or letter combinations that you do not want corrected automatically.

Options tab

Select the options for automatically correcting errors as you type.

Localized Options tab

Specify the AutoCorrect options for quotation marks and for options that are specific to the language of the text.

Reset button

Reset modified values back to their previous values.

Deactivating automatic changes

To turn off some or all AutoCorrect features, go to Tools > AutoCorrect Options on the Menu bar and uncheck unwanted features on the Options and Localized Options tabs on the AutoCorrect dialog.

Speeding up data entry

Calc provides multiple tools for removing some of the drudgery from input. The most common tool is to drag and drop the contents of one cell to another with a mouse. Other tools include AutoInput, the Fill tool, selection lists, the Data Entry tool, and the ability to input information into multiple sheets of the same document.

AutoInput tool

The AutoInput tool in Calc automatically completes entries, based on other entries in the same column. By default, AutoInput is activated in Calc. To turn it off, go to Tools on the Menu bar and deselect AutoInput.

When text is highlighted in a cell, AutoInput can be used as follows:

When typing formulas using characters that match function names, a help tip will appear listing the available functions that start with matching characters. AutoInput ignores the case sensitivity of any data you enter.

Filling cells

This tool allows you to duplicate existing content or create a series across a range of cells (see examples in Figure 27) using one of the following methods.

When you are selecting cells to use the Fill tool, make sure that none of the cells contain important data, except for the cell data you want to use. When you use the Fill tool, any data contained in the selected target cells is overwritten.

Method 1

  1. Select one or more cells that contain the contents you want to copy or start the series from.

  2. Drag the mouse pointer to fill the cells in any direction you desire, or hold down the Shift key and click in the last cell you want to fill.

  3. Go to Sheet > Fill Cells on the Menu bar and select the direction in which you want to copy or create data (Fill Down, Fill Right, Fill Up, Fill Left) or one of the other options (Fill Sheets, Fill Series, Fill Random Number) in the submenu. For more information about the Fill Sheets and Fill Random Number options, see Chapter 2, Entering and Editing Data in the Calc Guide.

Ctrl+D is an alternative to selecting Sheet > Fill Cells > Fill Down on the Menu bar.

Method 2

  1. Select one or more cells that contain the contents you want to copy or start the series from.

  2. Move the mouse pointer over the small square in the bottom right corner of the selected cells. The mouse pointer will change shape.

  3. Click and drag in the direction you want the cells to be filled. If the original cell contained a number or text from a defined sort list, then a series will be created. However, if the Ctrl button is pressed while dragging, then the original data is copied instead. If the original cell contained any other text, then that text will automatically be copied.

Figure 27: Using the Fill tool

Using the Fill tool

Using a fill series

When you select a series fill from Sheet > Fill Cells > Fill Series on the Menu bar, the Fill Series dialog (Figure 28) opens. Here you can select the type of series you want. For more detail about this dialog, see Chapter 2, Entering and Editing Data in the Calc Guide.

Figure 28: Fill Series dialog

Fill Series dialog

Defining a fill series

When a fill is initiated and the selected cell contains text, Calc will check if one of your predefined sort lists contains that text. If there is a sort list containing the text, Calc uses the entries in that sort list to fill cells. Go to Tools > Options > LibreOffice Calc > Sort Lists to view your currently defined sort lists.

To define your own sort list, which can later be used as a fill series:

  1. Go to Tools > Options > LibreOffice Calc > Sort Lists to open the Sort Lists dialog (Figure 29). This dialog shows any previously-defined series in the Lists box and the contents of the highlighted list in the Entries box.

  2. Click New and the Entries box is cleared.

  3. Type the series for the new list in the Entries box (one entry per line).

  4. Click Add and the new list will appear in the Lists box.

  5. Click OK to save the new list.

Filling text cells with selection lists

Selection lists are limited to using only text that has already been entered in the same column.

  1. Select a blank cell in a column that contains cells with text entries.

  2. Right-click and select Selection Lists in the context menu, or press Alt+Down Arrow. A context menu appears listing any cell in the same column that either has at least one text character or whose format is defined as text.

  3. Click on the text entry you require and it is entered into the selected cell.

Figure 29: Sort Lists dialog

Sort Lists dialog

Data Entry Form tool

This tool makes table data entry easier in spreadsheets, accelerating intensive manual input. Using the tool you can enter, edit, and delete data records (or rows) and avoid horizontal scrolling when the table has many columns or when some columns are very wide.

To be effective, the data table should have a header row, where the content of each cell is the title of the column. The content of each header cell becomes the label for each data field in the form.

To use the Data Entry Form tool:

  1. Select a header or data cell within the table of data.

  2. Go to Data > Form on the Menu bar.

  3. Calc displays the Data Form dialog (Figure 30), showing the data for the first entry in the data table.

  4. Add, edit, or remove entries from the data table as required.

  5. Click the Close button to close the dialog.

Figure 30: Data Form dialog

Data Form dialog

Sharing content between sheets

You might want to share the same information in the same cell on multiple sheets (for example, to set up standard listings for a group of individuals or organizations). Instead of entering the list on each sheet individually, you can enter the information in several sheets at the same time.

  1. Select the individual sheets where you want the information to be repeated. See the section “Selecting sheetsabove for more details.

  2. Enter the information in the cells on the first sheet where you want it to appear and it will be repeated in all the selected sheets.

This technique automatically overwrites, without any warning, any information that is already in the cells on the selected sheets. Make sure you deselect the additional sheets when you are finished entering information that is going to be repeated before continuing to enter data into the spreadsheet.

Validating cell contents

When creating a spreadsheet, you may want to restrict users to entering data that is valid and appropriate for the cell. Fill tools and selection lists can handle some types of data, but are limited to predefined information.

To add data validation to a cell, select that cell and use Data > Validity on the Menu bar to define which types of content can be entered in the cell. The Validity tool can:

See Chapter 2, Entering and Editing Data, in the Calc Guide for more information.

Editing data

Calc has multiple tools for data editing, including the ability to delete data, replace data, and change data.

Replacing data

To completely replace data in a cell, select the cell and type in the new data. The new data will replace the old, but cell formatting will be retained.

Alternatively, select the cell and click in the Input line on the Formula bar (Figure 2), then double-click on the data to highlight it completely and type the new data.

Changing data

Calc can allow you to edit the contents of a cell without removing all of the data from the cell. For example, changing the phrase “Sales in Qtr. 2” to “Sales rose in Qtr” can be done as follows.

Using the keyboard

  1. Click in the cell to select it.

  2. Press F2 to switch the cell to edit mode. The cursor is placed at the end of the content in the cell.

  3. Use the keyboard arrow keys to position the cursor where you want to start entering the new data in the cell, then press the Delete key or Backspace key to delete any unwanted data before typing the new data.

  4. When you have finished editing, press the Enter key to save the changes.

You may want to enable Tools > Options > LibreOffice Calc > General > Press Enter to switch to edit mode. Then, when you press the Enter key in a selected cell, the cell switches to edit mode, eliminating the need to press F2.

Using the mouse

  1. Use one of the following methods to prepare for editing cell data:

  1. Reposition the cursor to where you want to start editing the data, either in the cell or the Input line.

  2. When you have finished, click away from the cell to deselect it and save the changes.

Paste Special function

To copy text, numbers, or formulas to the target cell or cell range:

  1. Select the source cell or cell range and copy the data by pressing Ctrl+C, going to Edit > Copy on the Menu bar, clicking the Copy icon on the Standard toolbar, or right-clicking and selecting Copy in the context menu.

  2. Select the target cell or cell range.

  3. Right-click on the target cell or cell range and select Paste Special in the context menu, then select Unformatted Text, Text, Number, or Formula. Alternatively, use the equivalent submenu items reached from Edit > Paste Special on the Menu bar.

You can also use the Paste Special dialog to paste into another cell selected parts of the data in the original cell or cell range, for example its format or the result of its formula. To do this:

  1. Select the source cell or cell range and copy the data by pressing Ctrl+C, going to Edit > Copy on the Menu bar, clicking the Copy icon on the Standard toolbar, or right-clicking and selecting Copy in the context menu.

  2. Select the target cell or cell range.

  3. Go to Edit > Paste Special > Paste Special on the Menu bar, or press Ctrl+Shift+V, or right-click and select Paste Special > Paste Special in the context menu to open the Paste Special dialog (Figure 31).

Figure 31: Paste Special dialog

Paste Special dialog

  1. In the preset buttons on the left side of the dialog, you can choose to paste Values Only, Values & Formats, Formats Only, or to Transpose All the data in the target cells. On the right side of the dialog, select the options for Paste, Options, Operations, and Shift Cells. These are described in Chapter 2, Entering and Editing Data, in the Calc Guide.

  2. Click OK to paste the data into the target cell or range of cells and close the dialog.

To see which combination of options on the right side would apply if one of the  buttons in the Presets area is selected, deselect the Run immediately option. With the Run immediately option selected, clicking on a preset button applies that combination of options and closes the dialog.

Deleting data

Deleting data only

To delete only the data in a cell or range of cells, without deleting any of the cell formatting, select the cells and then press the Delete key.

To completely delete rows or columns, see the “Deleting columns or rows” section above. To completely delete cells, see the “Deleting cells” section above.

Deleting data and formatting

Data and cell formatting can be deleted from a cell at the same time. To do this:

  1. Select a cell or a range of cells.

  2. Press the Backspace key, or right-click in the cell selection and choose Clear Contents in the context menu, or select Sheet > Clear Cells on the Menu bar.

  3. In the Delete Contents dialog (Figure 32), choose any of the options or Delete all.

  4. Click OK.

Figure 32: Delete Contents dialog

Delete Contents dialog

Formatting data

All the settings discussed here can be set as a part of the cell style. See Chapter 5, Using Styles and Templates, in the Calc Guide for more information.

Multiple lines of text

Multiple lines of text can be entered into a single cell using automatic wrapping or manual line breaks.

Automatic wrapping

To automatically wrap multiple lines of text in a cell, use one of the following methods:

Method 1

  1. Select the cell and then access the Format Cells dialog (Figure 24).

  2. On the Alignment tab (Figure 33), under Properties, select Wrap text automatically and click OK.

Figure 33: Format Cells dialog – Alignment tab

Format Cells dialog – Alignment tab

Method 2

  1. Select the cell.

  2. On the Properties deck of the Sidebar, open the Alignment panel (Figure 34).

  3. Select the Wrap text option to apply the formatting immediately.

Figure 34: Wrap text formatting

Wrap text formatting

Method 3

  1. Select the cell.

  2. Click the Wrap Text icon on the Formatting toolbar.

Manual line breaks

To insert a manual line break in a cell, press Ctrl+Enter. When editing text, double-click the cell, then reposition the cursor to where you want the line break. In the Input line of the Formula bar, you can also press Shift+Enter.

When a manual line break is entered in a cell, the cell row height changes but the cell width does not change and the text may still overlap the end of the cell. You may need to change the cell width manually or reposition the line break.

Shrinking text to fit the cell

The font size of the data in a cell can automatically adjust to fit inside cell borders. To do this, select the Shrink to fit cell size option under Properties on the Alignment tab of the Format Cells dialog (Figure 33).

Merging cells

You can select contiguous cells and merge them into one large cell by:

  1. Selecting the range of contiguous cells you want to merge.

  2. Performing one of these steps:

  3. Right-clicking on the selected cells and select Merge Cells in the context menu.

  4. Going to Format > Merge and Unmerge Cells > Merge Cells or Merge and Center Cells on the Menu bar. Using Merge and Center Cells will center align any contents in the cells.

  5. Clicking on the Merge Cells or Merge and Center Cells icon on the Formatting toolbar.

  6. If the cells contain any data, a small dialog (Figure 35) opens, showing choices for moving or hiding data in the hidden cells. Make your selection and click OK.

Merging cells can lead to calculation errors in formulas used in the spreadsheet.

Figure 35: Merge choices for non-empty cells

Merge choices for non-empty cells

Splitting cells

You can split a cell that was created from several cells by:

  1. Selecting a merged cell.

  2. Going to Format > Merge Cells > Unmerge Cells on the Menu bar, or right-clicking and selecting Unmerge Cells in the context menu, or clicking on the Unmerge Cells icon on the Formatting toolbar.

Any data in the cell will remain in the first cell. If the hidden cells did have any contents before the cells were merged, then you have to manually move the contents in to the correct cell.

Formatting numbers

Calc allows you to apply number formats by using icons on the Formatting toolbar. Select the cell, then click the relevant icon to change the number format.

For more control or to select other number formats, use the Numbers tab of the Format Cells dialog (Figure 24):

Some number formats are available on the sidebar’s Number Format panel of the Properties deck. Click the More Options button to open the Format Cells dialog.

Formatting fonts and text in cells

For consistency in a spreadsheet, use cell styles whenever possible.

To manually select a font and format text for use in a cell:

  1. Select a cell or cell range.

  2. To change the font: click the arrowhead icon to the right of the Font Name box on the Formatting toolbar and select a font in the drop-down menu. A font is temporarily applied on selected cells by hovering or navigating in this menu. The font can also be changed using the Font tab of the Format Cells dialog or the Character panel on the Properties deck of the Sidebar.

  3. To change the font size: click the arrowhead icon to the right of the Font Size box on the Formatting toolbar and select a font size in the drop-down menu. The font size can also be changed using the Font tab of the Format Cells dialog or the Character panel on the Properties deck of the Sidebar.

  4. To change the character format, use one of the following methods:

  5. Click on the Bold, Italic, or Underline icons on the Formatting toolbar.

  6. Press Ctrl+B (bold), Ctrl+I (italic), or Ctrl+U (underline) keyboard shortcuts.

  7. Go to Format > Text on the Menu bar and select Bold, Italic, Single Underline, or Double Underline in the submenu.

  8. Click on the Bold, Italic, or Underline icons on the Character panel on the Properties deck of the Sidebar.

  9. Select Bold, Italic, or Bold Italic in the Style menu on the Font tab of the Format Cells dialog. Select an entry in the Underlining menu on the Font Effects tab of the Format Cells dialog.

Additional character format options (including strikethrough and shadowing) are available on the Format Cells dialog and the Sidebar.

To change the horizontal paragraph alignment, do one of the following:

  1. Click on one of the horizontal alignment icons (Align Left, Align Center, or Align Right) on the Formatting toolbar.

  2. Press Ctrl+L (left), Ctrl+E (center), Ctrl+R (right), or Ctrl+J (justified) keyboard shortcuts.

  3. Go to Format > Align Text on the Menu bar and select Left, Centered, Right, or Justified in the submenu.

  4. Click on the Align Left, Align Center, Align Right, or Justified icons on the Alignment panel of the Properties deck on the Sidebar.

  5. Select Left, Center, Right, Justified, Filled, or Distributed in the Horizontal menu on the Alignment tab of the Format cells dialog.

To change the vertical paragraph alignment, do one of the following:

  1. Click on one of the vertical alignment icons (Align Top, Center Vertically, Align Bottom) on the Formatting toolbar.

  2. Go to Format > Align Text on the Menu bar and select Top, Center, or Bottom in the sub-menu.

  3. Click on the Align Top, Center Vertically, or Align Bottom icons on the Alignment panel of the Properties deck on the Sidebar.

  4. Select Top, Middle, Bottom, Justified, or Distributed in the Vertical menu on the Alignment tab of the Format cells dialog.

To change the font color, do one of the following:

  1. Click the arrowhead icon to the right of the Font Color icon on the Formatting toolbar and select the desired color from the palette. If you want to apply the active (last used) color again, then simply click the main body of the Font Color icon.

  2. Click the arrowhead icon to the right of the Font Color icon on the Character panel on the Properties deck of the Sidebar, and select the desired color from the palette. If you want to apply the active (last used) color again, then simply click the main body of the Font Color icon.

  3. Click the Font color option on the Font Effects tab of the Format Cells dialog and select the desired color from the palette.

To specify the language used in the cell, use the Language menu provided on the Font tab on the Format Cells dialog.

Use the Font Effects tab on the Format Cells dialog to set other font characteristics.

Formatting cell borders

If you want to include borders around a cell or group of cells, use one of the following methods:

Method 1

  1. Select a cell or range of cells.

  2. To include borders around the selected cell(s), click the Borders icon on the Formatting toolbar or the corresponding control on the Cell Appearance panel in the Properties deck of the Sidebar.

  3. To select the line style of the borders, click the Border Style icon on the Formatting toolbar or the corresponding control on the Cell Appearance panel in the Properties deck of the Sidebar.

  4. To select a color for the borders, click the Border Color icon on the Formatting toolbar to apply the most recently selected color. Alternatively, click the arrowhead to the right of the Border Color icon on the Formatting toolbar or click the Border Color icon on the Cell Appearance panel in the Properties deck of the Sidebar, and then select the required color from the displayed palette.

Method 2

  1. Select a cell or range of cells.

  2. Access the Format Cells dialog (Figure 24).

  3. For more flexibility in defining border characteristics, including padding and shadow styles, use the Borders tab on the Format Cells dialog.

See Chapter 5, Using Styles and Templates, in the Calc Guide for more information.

Cell border properties apply only to the selected cells and can be changed only when you are editing those cells. For example, if cell C3 has a top border, that border can only be removed by selecting C3. It cannot be removed in C2 despite also appearing to be the bottom border for cell C2.

Formatting cell background

To change the background color for one or more selected cells, do one of the following:

See Chapter 5, Using Styles and Templates, in the Calc Guide for more information.

Formatting default cell styles

Several predefined cell styles are supplied with Calc. In addition, you can create custom cell styles by doing one of the following:

You can apply any cell style to selected cells using the Cell Styles tab of the Styles deck. In addition, you can apply predefined cell styles using options in the Styles menu on the Menu bar. Through the Styles deck, you can modify any cell style or delete any custom cell style. It is not possible to delete predefined cell styles.

Using AutoFormat on cells

Using AutoFormat

You can use Calc’s AutoFormat feature to format a table (range of cells) quickly and easily. All formatting applied is direct formatting – cell styles are not used.

  1. Select the cells in at least three columns and rows, including column and row headers, that you want to format.

  2. Go to Format > AutoFormat Styles on the Menu bar to open the AutoFormat dialog (Figure 36).

  3. Select the type of format and format color in the list.

  4. Select the formatting properties to be included in the AutoFormat style. Click OK.

Figure 36: AutoFormat dialog

AutoFormat dialog

Defining a new AutoFormat

You can define a new AutoFormat so that it becomes available for use in all spreadsheets.

  1. Format the data type, font, font size, cell borders, cell background, and so on for a range of cells.

  2. Select the range, of at least 4x4 cells.

  3. Go to Format > AutoFormat Styles to open the AutoFormat dialog. Click Add.

  4. In the Name box of the Add AutoFormat dialog that opens, type a meaningful name for the new format.

  5. Click OK to save. The new AutoFormat is now available in the Format list on the AutoFormat dialog.

The new AutoFormat is stored in your computer user profile and is not available to other users. However, you can use it in other spreadsheets. Other users can import the new AutoFormat by selecting a common style from a table range in the spreadsheet and defining it as a new AutoFormat.

Using themes

Spreadsheet themes

Calc comes with a predefined set of formatting themes (set of styles) that can be applied to spreadsheets. You cannot add new themes to Calc, but you can modify a theme’s styles after the theme is applied to the spreadsheet. All modified styles are only available for use in that spreadsheet.

To apply a theme to a spreadsheet:

  1. Go to Format > Spreadsheet Theme on the Menu bar or click the Spreadsheet Theme icon on the Tools toolbar to open the Theme Selection dialog (Figure 37).

  2. Select the theme that you want to apply. The theme styles are immediately visible on the underlying spreadsheet.

  3. Click OK.

Figure 37: Theme Selection dialog

Theme Selection dialog

Selecting a spreadsheet theme adds several new cell styles to the spreadsheet and modifies the Default cell style.

If you wish, you can now open the Styles deck on the Sidebar to modify specific styles. These changes do not modify the theme; they only change the appearance of the style in the specific spreadsheet you are using. For more about modifying styles, see Chapter 4, Working with Styles, Templates, and Hyperlinks.

Applying a new theme over an existing one will override all existing theme styles customization with the new theme styles.

Document themes

Document themes collect various format selections into a set that can be applied and changed quickly. Theme colors were implemented in LibreOffice 7.6; font and format settings are planned for later releases.

Calc supplies several sets of theme colors, and you can define other sets. Theme colors have names like Dark 1, Light 2, Accent 3, and so on. They can be used in styles or applied manually.

To set up a spreadsheet to use themes, choose colors for fonts, backgrounds, or objects from the Theme colors palette (Figure 38), not an ordinary color palette. The first row of the palette contains the theme colors, with other rows containing modifications. For example, the top-left color in the palette is the currently selected theme’s Dark 1 color; the leftmost color in the second row is a 50% lighter version of Dark 1; the entry at the intersection of the second column and third row is a 15% darker version of Light 1; and so on. You can hover the pointer over any palette cell to see a tooltip indicating the detail of that color.

Figure 38: A palette of theme colors

A palette of theme colors

To change the set of theme colors, choose Format > Theme on the Menu bar and select a different theme on the Theme dialog (Figure 39). Colors defined as theme colors change in the document. You need not change any style and need not change any object individually.

Figure 39: Theme dialog

Theme dialog

For more information, see Chapter 5, Using Styles and Templates, in the Calc Guide.

Using conditional formatting

Calc can change cell formats depending on user-specified conditions, and those conditions can be imposed in a specified order. For example, a table can show all the values above a specific average in green and all those below that average in red. Conditional formatting also allows you to add graphic icons and data bars to the cell background.

Conditional formatting depends upon the use of styles, and the AutoCalculate feature (Data > Calculate > AutoCalculate) must be enabled. See Chapter 4, Formatting Data, in the Calc Guide for details.

Filtering data

A filter is a tool that hides or displays records within a sheet based on a set of filtering conditions. Similar to sorting, filters are useful for narrowing down long lists of data in order to find particular data items. In Calc, three types of filter exist:

AutoFilter – the most straightforward filter type, providing access to a combo box through arrowhead buttons located at the top of one or more data columns. This box provides options for basic sorting (ascending and descending); sorting by background or font color; filtering by background or font color; filtering by condition (empty, not empty, top 10, and bottom 10); and others.

Standard filter – more complex than AutoFilters, allowing for up to eight filter conditions. Powerful filters can be set up using regular expressions. Also, unlike AutoFilters, standard filters use a dialog to define the conditions.

Advanced filter – filter conditions are stored in a sheet rather than entered into a dialog.

Setting up and using filters are explained in Chapter 2, Entering and Editing Data, in the Calc Guide.

Cell protection

Cells can be password-protected to prevent unauthorized users from making changes. Protected cells can optionally be hidden. Use the Cell Protection tab of the Format Cells dialog (Figure 40) to set up cell protection and toggle the hidden status of protected cells.

Figure 40: Cell Protection tab in Format Cells dialog

Cell Protection tab in Format Cells dialog

Once all desired cells have been flagged with either a protected or unprotected status:

  1. Go to Tools > Protect Sheet, or right-click on the sheet’s tab and select Protect Sheet in the context menu. The Protect Sheet dialog opens (Figure 41).

  2. Select Protect this sheet and the contents of protected cells.

  3. Type a password and then confirm the password. The dialog provides a password strength meter to indicate the strength of the entered password. This incorporates a colored bar to reflect password strength, with red indicating a weak password and green indicating a strong password. In addition, the longer the colored bar, the greater the strength of the password.

  4. Select or deselect the elements to protect from user actions.

  5. Click OK.

Figure 41: Protect Sheet dialog with password strength meter

Protect Sheet dialog with password strength meter

Any cells that had been marked as protected will no longer be editable by anyone that does not have the password.

The protected sheet has a padlock icon in its tab, as shown in Figure 42.

Figure 42: The padlock icon in a protected sheet

The padlock icon in a protected sheet

Alternatively, the entire spreadsheet can be password-protected by selecting Tools > Protect Spreadsheet Structure on the Menu bar. When this option is chosen, unauthorized users cannot add, delete, move, or rename any sheets in the document.

Sorting records

When Calc sorts cells in a sheet, they are re-ordered based on user-specified sort criteria. Sorts are useful when you are searching for a particular item and become even more useful after you have filtered data.

Also, sorting allows you to add new information to the bottom of your spreadsheet and then use a sort to put the values in their proper order. When a spreadsheet is long, it is usually easier to add new information at the bottom of the sheet, rather than adding rows in their correct place. After you have added information, you can then sort the records to update the spreadsheet.

For more information on sorting records and the sorting options available, see Chapter 2, Entering and Editing Data, in the Calc Guide.

To use the Sort dialog on cells in a spreadsheet:

  1. Select the cells to be sorted.

  2. Go to Data > Sort on the Menu bar, or click the Sort icon on the Standard toolbar, to open the Sort dialog (Figure 43).

  3. On the Sort Criteria tab, select the sort criteria in the drop-down lists. The selected lists are populated from the selected cells.

  4. Select either ascending order (A-Z, 0-9) or descending order (Z-A, 9-0).

  5. Adjust the settings as required on the Sort Criteria and Options tabs. For details, see the Help or Chapter 2, Entering and Editing Data, in the Calc Guide.

  6. Click OK and the sort is carried out on the spreadsheet.

Figure 43: Sort dialog, Sort Criteria tab

Sort dialog, Sort Criteria tab

Cell comments

Users can add a comment to a cell. These comments are small notes and text that provide extra information about the spreadsheet. They are not considered a part of the spreadsheet for calculation or printing purposes, and usually only appear when the user hovers the mouse over the particular cell that has been commented.

You can insert a comment by any of the following actions:

Cells that contain comments are marked with a colored triangle in the upper right corner. By default, comments will remain hidden and only appear when you hover the mouse over a cell that contains a comment. To toggle the visibility of comments, select View > Comments on the Menu bar.

For more information, see Chapter 12, Sharing and Reviewing Spreadsheets, in the Calc Guide.

Using formulas and functions

You may need more than numbers and text in a spreadsheet. Often the contents of one cell depend on the contents of other cells. Formulas are equations that use numbers and variables to produce a result. Any cell can contain a formula. Variables are placed in cells to hold data required by equations.

A function is a predefined calculation entered in a cell to help you analyze or manipulate data. All you have to do is enter the arguments and the calculation is made automatically. Functions help you create the formulas required to get the results that you are looking for.

Creating formulas

Functions and formulas can be entered directly into the Formula bar or by using the Function Wizard. To launch the Function Wizard, click the Function Wizard icon on the Formula bar, select Insert > Function on the Menu bar, or press Ctrl+F2.

Inside the Function Wizard, you can choose from the many built-in Calc functions available. When you search for a term in the Function Wizard, function descriptions are provided as well as their names. You can also choose to complete functions from within the wizard rather than having to type full formulas into the Formula bar.

Each function, when selected, will display a brief explanation of its use and acceptable syntax. It will also allow you to enter the information required by that function and a result window will showing the expected calculation from the data entered.

A fast alternative to the Function Wizard is the Functions deck on the Sidebar, where you can quickly list and narrow down functions. It provides brief explanations on their use and syntax, but does not provide the search or data entry capabilities of the full wizard.

Calc offers powerful built-in functions under multiple categories, covering Database, Date & Time, Financial, Information, Logical, Mathematical, Array, Statistical, Spreadsheet, Text, and Add-in functions.

For a more in-depth introduction to formulas and the Function Wizard, see Chapter 8, Using Formulas and Functions, in the Calc Guide.

Figure 44: Function Wizard

Function Wizard

Analyzing data

Calc includes many tools to help you analyze information, including features for copying and reusing data, for automatically creating subtotals, and other ways to vary information and help you find the answers you need. These tools are divided between the Tools and Data menus.

Calc also includes many tools for statistical analysis, and they can help you obtain important numerical information on data obtained from physical measurements, polls, or even business transactions such as sales, stock quotations, and so on. These statistical data analyses are available in the menu Data > Statistics.

See Chapter 10, Data Analysis, in the Calc Guide for more information on the these tools.

Pivot tables and pivot charts

One of the most useful tools for analyzing data is the pivot table, which allows you to organize, manipulate, and summarize large amounts of data to make it much easier to read and understand. They also allow you to answer different questions about a spreadsheet by rearranging – or pivoting – the data in it, which includes the ability to view different summaries of the source data, display the details of areas of interest, and create reports. You can also create a pivot chart that allows you to view a graphical representation of the data in a pivot table.

For example, you might have a spreadsheet containing a list of donations to various charities by a group of recruiters in various months, but you are only interested in how much money each recruiter has collected in total. Instead of manually calculating that amount by using the sorting and formatting options, you could arrange a pivot table which makes that data easier to organize and read.

To create a pivot table, choose Data > Pivot Table > Insert or Edit on the Menu bar, or click the Insert or Edit Pivot Table icon on the Standard toolbar. The Pivot Table Layout dialog will intelligently guess the column headings from the provided raw data and insert them into the Available Fields selection box. From there, you can drag and drop your desired information into column, row, data, or filter fields to organize accordingly and click OK to view the results.

To choose new information to display, or to alter the layout of the existing information, right-click anywhere in the existing pivot table to bring up the context menu and choose Properties. You can also access the same dialog by selecting Data > Pivot Table > Insert or Edit on the Menu bar, or clicking the Insert or Edit Pivot Table icon on the Standard toolbar.

For an in-depth explanation of pivot tables and the preconditions necessary to use them, see Chapter 9, Using Pivot Tables, in the Calc Guide.

Pivot charts

To get a quick visual representation of the data contained in a pivot table, you can generate a pivot chart. Functionally, pivot charts are nearly identical to regular charts except in two key areas. First, as the data in the pivot table is altered, the pivot chart will adjust itself automatically. Second, a pivot chart includes field buttons, which are graphical elements that allow you to filter the content of the pivot table from within its pivot chart.

For more information on pivot charts and charts in general, see Chapter 3, Creating Charts and Graphs, and Chapter 9, Using Pivot Tables, in the Calc Guide.

Printing

Printing from Calc is similar to  printing from other LibreOffice components (see Chapter 1, LibreOffice Basics), but some details of printing in Calc are different, especially regarding preparation for printing.

After print ranges have been defined, they are formatted with automatic page breaks. To view the page breaks, go to View > Page Break on the Menu bar.

Print ranges

Print ranges can be used to print a specific part of the data and print selected rows or columns on every page. For more information about using print ranges, see Chapter 7, Printing, Exporting, Emailing, and Signing in the Calc Guide.

Defining a print range

To define a new print range or modify an existing print range:

  1. Select the range of cells to be included in the print range.

  2. Go to Format > Print Ranges > Define on the Menu bar. Automatic page break lines are displayed on screen.

  3. To check the print range, go to File > Print Preview on the Menu bar, press Ctrl+Shift+O, or click the Toggle Print Preview icon on the Standard toolbar. Calc will display only the cells in the print range.

Adding to a print range

After defining a print range, you can add more cells to it by creating another print range. This allows multiple, separate areas of the same sheet to be printed while not printing the whole sheet.

  1. After defining a print range, select an extra range of cells for adding to the print range.

  2. Go to Format > Print Ranges > Add on the Menu bar to add the extra cells to the print range. The page break lines are no longer displayed on the screen.

  3. To check the print ranges, go to File > Print Preview on the Menu bar, press Ctrl+Shift+O, or click the Toggle Print Preview icon on the Standard toolbar. Calc will display the print ranges as separate pages.

The additional print range will print as a separate page, even if both ranges are on the same sheet.

Removing a print range

It may become necessary to remove a defined print range, for example, if the whole sheet needs to be printed later.

To remove all the defined print ranges, go to Format > Print Ranges > Clear on the Menu bar. After the print ranges have been removed, the default page break lines will appear on the screen.

Editing a print range

At any time, you can directly edit the print range, for example to remove or resize part of the print range. Go to Format > Print Ranges > Edit on the Menu bar to open the Edit Print Ranges dialog where you can modify the print range.

Printing options

To select the options for page order, elements to be printed, and scale to be used when printing a spreadsheet:

  1. Go to Format > Page Style on the Menu bar to open the Page Style dialog (Figure 45).

  2. Select the Sheet tab and make your selections from the available options. Click OK.

Figure 45: Page Style dialog – Sheet tab

Page Style dialog – Sheet tab

Repeat printing of rows or columns

If a sheet is printed on multiple pages, you can set up certain rows or columns to repeat on each printed page. For example, if the top two rows of the sheet as well as column A need to be printed on all pages, do the following:

  1. Go to Format > Print Ranges > Edit on the Menu bar to open the Edit Print Ranges dialog (Figure 46).

  2. Type the row identifiers in the Rows to Repeat box. For example, to repeat rows 1 and 2, type $1:$2. This automatically changes Rows to Repeat from - none - to - user defined -.

  3. Type the column identifiers in the Columns to Repeat box. For example, to repeat column A, type $A. In Columns to Repeat, - none - changes to - user defined -.

  4. Click OK.

For more information on editing print ranges, see Chapter 7, Printing, Exporting, Emailing, and Signing, in the Calc Guide.

Figure 46: Edit Print Ranges dialog

Edit Print Ranges dialog

Page breaks

While defining a print range can be a powerful tool, it may sometimes be necessary to manually adjust the printout using a manual page break. A page break helps to ensure that the data prints properly according to the page size and page orientation. You can insert a horizontal page break above or a vertical page break to the left of the active cell.

Inserting a break

To insert a page break:

  1. Navigate to the cell where the page break is needed.

  2. Go to Sheet > Insert Page Break on the Menu bar.

  3. Select Row Break to create a horizontal page break above the selected cell or select Column Break to create a vertical page break to the left of the selected cell.

After selecting View > Page Break, you can right-click on a cell to access a context menu containing Row Break and Column Break options.

Deleting a break

To remove a page break:

  1. Navigate to a cell that is next to the page break you want to remove.

  2. Go to Sheet > Delete Page Break on the Menu bar.

  3. Select Row Break or Column Break as needed.

Multiple manual row and column breaks can exist on the same sheet. When you want to remove them, you can remove each break individually, as described above. However, after selecting View > Page Break, you can right-click on a cell to access a context menu containing a Delete All Breaks option to remove them all at once.

For more information on page breaks, see Chapter 7, Printing, Exporting, Emailing, and Signing, in the Calc Guide.

Headers and footers

Headers and footers are text that can be printed at the top or bottom of a page when a you print a spreadsheet. Headers and footers are set and defined using the same method. For more information on setting and defining headers and footers, see Chapter 7, Printing, Exporting, Emailing, and Signing, in the Calc Guide.

Headers and footers are also assigned to a page style. You can define more than one page style for a spreadsheet and assign different page styles to different sheets within a spreadsheet. For more information, see Chapter 5, Using Styles and Templates, in the Calc Guide.

Setting a header or footer

To set a header or footer:

  1. Select the sheet that you want to set the header or footer for.

  2. Open the Page Style dialog (Figure 47) using one of the following methods:

  3. Go to Format > Page Style on the Menu bar.

  4. On the Styles deck of the Sidebar, right-click the relevant page style and select Modify in the context menu.

  5. Double-click the name of the page style on the Status Bar.

  6. Select the Header or Footer tab as appropriate.

  7. Select the Header on or Footer on option.

  8. Select Same content on left and right pages if you want the same header or footer to appear on all the printed pages.

  9. Select / deselect Same content on first page as required.

  10. Set the margins, spacing, and height for the header or footer. You can also select AutoFit height to automatically adjust the height of the header or footer.

  11. To change the appearance of the header or footer, click on More to open the Border / Background dialog.

  12. To set the contents, for example page number, date and so on, that appear in the header or footer, click Edit to open the Headers (or Footers) dialog.

  13. Click OK to save your changes.

Figure 47: Header tab of Page Style dialog

Header tab of Page Style dialog

Contents