Image6

Calc Guide 7.5

Chapter 1
Introduction

Using spreadsheets in LibreOffice

Copyright

This document is Copyright © 2023 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 (https://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (https://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

Olivier Hallot

 

 

To previous editions

Skip Masonsmith

Kees Kriek

 

Barbara Duprey

Gabriel Godoy

Jean Hollis Weber

John A Smith

Christian Chenal

Laurent Balland-Poirier

Philippe Clément

Pierre-Yves Samyn

Shelagh Manton

Peter Schofield

Cathy Crumbley

Kees Kriek

Steve Fanning

Leo Moons

Gordon Bates

Felipe Viggiano

Zbyszek Zak

 

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.

Note

Everything you post to a forum, including your email address and any other personal information that is written in the message, is publicly archived and cannot be deleted. E-mails sent to the forum are moderated.

Publication date and software version

Published February 2023. Based on LibreOffice 7.5 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 document. For a more detailed list, see the Help and Appendix A (Keyboard Shortcuts) to this guide.

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

F11

⌘+T

Open the Styles deck in the 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 produce certain results.

Alternatively, you can enter data and then use Calc in a ‘What if...’ manner by changing some of the data and observing the results without having to retype the entire spreadsheet or sheet.

Other features provided by Calc include:

Note

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, see Chapter 11, Macros, in this guide or Chapter 13, Getting Started with Macros, in the Getting Started Guide.

Spreadsheets, sheets, and cells

Calc works with documents called spreadsheets. Spreadsheets consist of a number of individual sheets, each sheet containing cells arranged in rows and columns. A particular 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 16,384 columns.

Calc main window

When Calc is started, the main window opens (Figure 1). The various parts of this display are explained below.

Note

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

Note

If any part of the Calc window in Figure 1 is not shown, you can display it using the View menu. For example, View > Status Bar on the Menu bar will toggle (show or hide) the Status Bar. It is not always necessary to display all of the parts shown; you can show or hide any of them as desired.

Figure 1: Calc main window

Image4

Title bar

The Title bar, located at the top, shows the name of the current spreadsheet. When the spreadsheet is newly created, 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 choose one of the menus, a list of options appears. You can also modify the Menu bar, as explained in Chapter 15, Setting up and Customizing.

The scope of the Menu bar can be daunting for some people and even experienced users can forget where to look for rarely used functions. To quickly locate and run a command in the Menu bar, select Help > Search Commands or press Shift+Esc. Calc displays the dialog shown in Figure 2.

Figure 2: Search Commands dialog

Image1

In the above example the pop-up is used to search for the available recalculate options, which appear in the lower area as soon as the letters “Reca” are typed in the upper area. The required option is run by clicking on it, or by using the arrow buttons on the keyboard to move through the options and then pressing the Enter key.

Toolbars

The default setting when Calc opens is for the Standard and Formatting toolbars to be docked at the top of the workspace (Figure 1).

Calc toolbars can be either docked (fixed in place), or floating, allowing you to move a toolbar to a more convenient location on your workspace. Docked toolbars can be undocked and moved to a different docked location or become floating toolbars. Likewise, floating toolbars can be docked.

The initial default is for all displayed toolbars to be locked in their docked positions. An individual toolbar can be unlocked, when a vertical handle is displayed at its left edge, and this handle can be used to drag the toolbar to a new screen position. To lock / unlock all toolbars at once, select View > Toolbars > Lock Toolbars (LibreOffice must be restarted to apply this change).

You can choose the single-toolbar alternative to the default double toolbar arrangement. It contains the most-used commands. To activate it, enable View > User Interface > Single Toolbar. Other variations are also available through View > User Interface.

For additional information on toolbars, see Chapter 1, Introducing LibreOffice, in the Getting Started Guide.

The default set of icons (sometimes called buttons) on toolbars provides a wide range of common commands and functions. You can also remove or add icons to toolbars. See Chapter 15, Setting up and Customizing, for more information.

Placing the mouse pointer over an icon, text box, or menu command, displays a small box called a tooltip that shows the name of the item’s function. To close a tooltip, move away from the underlying component or press the Esc key.

To see a more detailed explanation of an icon, text box, or menu command, do one of the following to open extended tips:

Formula Bar

The Formula Bar is located at the top of 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 3: Formula Bar

Image2

From left to right in Figure 3, the Formula Bar consists of the following:

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

Note

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

Status Bar

The Status Bar at the bottom of the workspace (Figure 4) provides information about the spreadsheet and convenient ways to quickly change some of its features. Most of the fields are similar to those in other components of LibreOffice. See Chapter 1, Introducing LibreOffice, in the Getting Started Guide for more information.

Figure 4: Status Bar

Image278

The fields on the Status Bar, from left to right, are as follows.

Sheet number

Shows the sequence number of the current sheet and the total number of sheets in the spreadsheet. The sequence number may not be the same as the name on the sheet tab if sheets have been moved. Double-click on this zone to open the Navigator dialog.

Cell selection information

Shows how many rows and how many columns are selected. Blank if the selected cells do not form a rectangular block.

Page style

Shows the page style of the current sheet. To edit the page style, double-click on this field and the Page Style dialog opens.

Language

Shows current default language as selected at Tools > Options > Language Settings > Languages.

Insert / overwrite mode

When you are interacting with a cell in edit mode, this field distinguishes between the insert and overwrite modes. If the cell being edited is in overwrite mode, the field shows the text Overwrite. In other cases, the field is blank. You can press the Insert key on the keyboard, or click on this field, to switch between insert and overwrite modes.

Selection mode

Click to open a context menu and select Standard selection, Extending selection, or Adding selection. The icon changes when different selection modes are selected. See Chapter 1, Introducing LibreOffice, in the Getting Started Guide for more information.

Unsaved changes

The appearance of this icon indicates whether the spreadsheet contains unsaved changes. When there are unsaved changes, click this icon, use File > Save, click the Save icon on the Standard toolbar, or press Ctrl+S to save the spreadsheet.

Digital signature

If the document has been digitally signed, an icon shows here. You can click the icon to view the certificate. See Chapter 7, Printing, Exporting, E-mailing, and Signing for more information about digital signatures.

Cell or object information

Displays information related to the position of the cursor or the selected element of the spreadsheet. When a group of cells is selected, the average and sum of the contents is displayed by default. Right-click in this field to select other functions, such as the maximum value, minimum value, or count (number of items selected).

Zoom slider

Drag the zoom slider, click on the slider’s rail, or click the + and – symbols to change the view magnification.

Zoom percentage

Indicates the magnification level of the document. Right-click on the percentage to open a list of magnification values from which to choose. Click on the percentage to open the Zoom & View Layout dialog.

Sidebar

The Sidebar (Figure 5) is a mixture of toolbar and dialog. When opened (View > Sidebar or Ctrl+F5), it appears on the right side of the window. When entering or editing data in cells, the Sidebar consists of five decks: Properties, Styles, Gallery, Navigator, and Functions. Each deck has a corresponding icon on the Tab panel to the right of the Sidebar, allowing you to switch between them. These decks are described below. However, the Sidebar is context-sensitive and the number of decks and the content of each may change when you select objects such as images or charts.

Properties

The Properties deck includes five content panels. Each panel has a More Options button that provides additional options. If a dialog opens, it locks the document for editing until it is closed.

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

Character: Options for formatting the text, such as font name, size, and color. Some controls, such as superscript, only become active when the text cursor is active in the Input line of the Formula Bar or the cell.

Number Format: Options for formatting numbers, including decimals, currency, dates, or numeric text.

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

Cell Appearance: Options include background color and border formats, including line color and style.

Styles

The Styles deck enables you to apply existing styles, modify existing styles, or create new styles. This deck can also be opened by selecting Styles > Manage Styles on the Menu bar, selecting View > Styles on the Menu bar, or pressing F11.

Figure 5: Sidebar

Image9

Gallery

The Gallery deck enables you to add images, diagrams, or other objects that are available in the Gallery themes. This deck can also be opened by selecting View > Gallery on the Menu bar.

Navigator

The Navigator deck can also be opened by selecting View > Navigator from the Menu bar or pressing F5. See “Using the Navigatorbelow.

Functions

The Functions deck contains a list of Calc’s many 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.

To the right side of the title bar of each open deck is a Close Sidebar Deck button, which closes the deck to leave only the Tab bar of the Sidebar open. Click any button in the Tab bar to toggle on / off the display of the associated deck.

To hide the Sidebar, or reveal it if already hidden, click on the left edge Hide/Show button. To adjust the deck width, drag on the left edge of the Sidebar.

Spreadsheet layout

Individual cells

The main section of the screen displays the cells in the form of a grid, with each cell located at the intersection of a column and a row.

At the top of the columns and the left end of the rows are a series of header boxes containing letters and numbers. The column headers use alphabetic characters that start with A and increase to the right. The row headers use numerical characters that start at 1 and increase down.

These column and row headers form the cell references that appear in the Name Box on the Formula Bar (Figure 3). If the headers are not visible on the spreadsheet, go to 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). See Chapter 15, Setting up and Customizing for more information.

Sheet tabs

A spreadsheet file can contain many individual sheets. At the bottom of the grid of cells in a spreadsheet are sheet tabs (Figure 1). Each tab represents a sheet in a spreadsheet. You can create a new sheet by clicking on the plus sign to the left of the sheet tabs or by clicking in the blank space to the right of the sheet tabs.

Clicking on a tab makes an individual sheet active. When a sheet is active, the tab is highlighted. To select multiple sheets, hold down the Ctrl key while clicking on the sheet tabs.

To change the default name for a sheet (Sheet1, Sheet2, and so on):

1)  Right-click on the sheet tab and select Rename Sheet in the context menu. In the dialog that opens, type in a new name for the sheet.

2)  Click OK when finished to close the dialog.

To change the color of a sheet tab:

1)  Right-click on the sheet tab and select Tab Color in the context menu to open the Tab Color dialog (Figure 6).

Figure 6: Tab Color dialog

LibreOfficeLogo

2)  Select a color and click OK when finished to apply the color and close the dialog.

To add new colors to this color palette, see “Adding custom colors” in Chapter 15, Setting up and Customizing.

Creating, opening, and saving spreadsheets

Creating and opening

Creating and opening spreadsheets is identical to creating and opening documents in the other LibreOffice modules. For more information on creating and opening spreadsheets, see Chapter 1, Introducing LibreOffice, in the Getting Started Guide.

Using templates

Calc documents can also be created from templates. For information on how to create and use templates, see Chapter 5, Using Styles and Templates, in this guide.

Opening a CSV file

Comma-separated values (CSV) files are spreadsheet files in a text format where cell contents are separated by a character such as a comma or semi-colon. Each line in a CSV text file represents a row in a spreadsheet. Text is entered between quotation marks; numbers are entered without quotation marks.

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 locate the CSV file that you want to open.

2)  Select the file and click Open. By default, a CSV file has the extension .csv. However, some CSV files may have a .txt extension.

3)  The Text Import dialog (Figure 7) opens. Here you can select options for importing a CSV file into a Calc spreadsheet.

4)  Click OK to open and import the file.

The options for importing CSV files into a Calc spreadsheet are as follows:

Import

Separator Options

Tip

CSV files can identify the separator to use by including a first row of sep=X or “sep=X” where X is the separator character. Set From row to 2 to import correctly.

Figure 7: Text Import dialog

Image8

Other options

Fields – shows how your data will look when it is separated into columns.

Column type – select a column in the preview window and select the data type to be applied to the imported data.

Saving spreadsheets

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

Saving in other formats

If you need to send files to users who are unable to receive spreadsheet files in Open Document Format (ODF) (*.ods), which Calc uses as its default format, you can save a spreadsheet in another format.

1)  Select File > Save As on the Menu bar, click the down arrow at the right of the Save icon on the Standard toolbar and select Save As from the drop-down menu, or press Ctrl+Shift+S to open the Save As dialog (Figure 8).

2)  In File name, if you wish, enter a new file name for the spreadsheet and select the folder where you want to save the file.

3)  In the Save as type field, select from the drop-down menu the type of spreadsheet format you want to use. If Automatic file name extension is selected, the correct file extension for the spreadsheet format you have selected will be added to the file name.

4)  Click Save.

Figure 8: The Save As dialog

Image19

Each time a file is saved in a format other than ODF format, the Confirm File Format dialog opens (Figure 9). Click Use [xxx] Format to continue saving in the selected spreadsheet format or click Use ODF Format to save the spreadsheet in Calc’s default format. If you disable Warn when not saving in ODF or default format on Tools > Options > Load/Save > General on the Menu bar, the Confirm File Format dialog will no longer appear. You can also clear the checkbox Ask when not saving in ODF or default format on the dialog to stop the dialog appearing.

Figure 9: Confirm File Format dialog

Image21

If you select Text CSV format (*.csv), the Export Text File dialog (Figure 10) opens. Here you can select the character set, field delimiter, string delimiter, and so on to be used for the CSV file.

Note

Once you have saved a spreadsheet in another format, all changes you make to the spreadsheet will now occur only in the format you are using because you have changed the name and file type of your document. If you want to go back to working with an *.ods version, you must save the file as an *.ods file.

Figure 10: Export Text File dialog

Image24

Tip

To have Calc save documents by default in a file format other than the default ODF format, go to Tools > Options > Load/Save > General. In the section named Default File Format and ODF Settings, next to Document type, select Spreadsheet, then next to Always save as, select your preferred file format, for example one of the available Microsoft Excel options.

Password protection

To protect a spreadsheet and restrict who can open, read, and make changes to it, you have to use password protection. Password protection is common to all LibreOffice modules; for more information, see Chapter 1, Introducing LibreOffice, in the Getting Started Guide.

Navigating within spreadsheets

Calc provides many ways to navigate within a spreadsheet from cell to cell and sheet to sheet. You can generally use the method you prefer.

Cell navigation

When a cell is selected or in focus, the cell borders are emphasized. When a group of cells is selected, the cell area is colored. The color of the cell border emphasis and the color of a group of selected cells depends on the operating system being used and uses your system’s highlight color.

Sheet navigation

Each sheet in a spreadsheet is independent of the other sheets, though references can be linked from one sheet to another. There are four ways to navigate between different sheets in a spreadsheet.

If there are many sheets in the spreadsheet, some of the sheet tabs may be hidden. If this is the case, use the four buttons to the left of the sheet tabs to move the tabs into view (Figure 11).

Note

The sheet tab arrows that appear on the left in Figure 11 are only active if there are more sheet tabs than can be displayed.

Figure 11: Navigating sheet tabs

Image11

Note

When you insert a new sheet into a spreadsheet, Calc automatically uses the next number in the numeric sequence as a name. Depending on which sheet is open when you insert a new sheet, your new sheet may not be in numerical order. It is recommended to 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 at the same time. For example, Ctrl+Home moves the focus to cell A1. Table 1 lists the keys and key combinations you can use for spreadsheet navigation in Calc.

Table 1. Keyboard cell navigation

Keyboard shortcut

Cell navigation

→/←

Moves cell focus right/left one cell.

↑/↓

Moves cell focus up/down one cell.

Ctrl+→ /

Ctrl+←

If focus is on a blank cell, Ctrl+→ moves focus along the current row to the first cell on the right that contains data. If there is no cell on the right containing data, it moves focus along the current row to the last cell at the right of the sheet.

If focus is on a blank cell, Ctrl+← moves focus along the current row to the first cell on the left that contains data. If there is no cell on the left containing data, it moves focus along the current row to the cell in column A of the sheet.

If focus is on a cell containing data, Ctrl+→ normally moves focus along the current row to the cell at the right edge of the same data region. However, if there is a blank cell to the right of the original cell, focus is moved to the cell at the left edge of the next data region to the right. In this case, if there is no data region to the right, focus is moved along the current row to the last cell at the right of the sheet.

If focus is on a cell containing data, Ctrl+← normally moves focus along the current row to the cell at the left edge of the same data region. However, if there is a blank cell to the left of the original cell, focus is moved to the cell at the right edge of the next data region to the left. In this case, if there is no data region to the left, focus is moved along the current row to the cell in column A of the sheet.

Ctrl+↑ /

Ctrl+↓

If focus is on a blank cell, Ctrl+↑ moves focus up the current column to the first cell that contains data. If there is no cell above containing data, it moves focus up the current column to the cell in row 1 of the sheet.

If focus is on a blank cell, Ctrl+↓ moves focus down the current column to the first cell that contains data. If there is no cell below containing data, it moves focus down the current column to the last cell at the bottom of the sheet.

If focus is on a cell containing data, Ctrl+↑ normally moves focus up the current column to the cell at the top edge of the same data region. However, if there is a blank cell above the original cell, focus is moved to the cell at the bottom edge of the next data region above. In this case, if there is no data region above, focus is moved up the current column to the cell in row 1 of the sheet.

If focus is on a cell containing data, Ctrl+↓ normally moves focus down the current column to the cell at the bottom edge of the same data region. However, if there is a blank cell below the original cell, focus is moved to the cell at the top edge of the next data region below. In this case, if there is no data region below, focus is moved down the current column to the bottom of the sheet.

Ctrl+Home / Ctrl+End

A detailed description of these shortcuts is given on Page 1.

Alt+Page Down /

Alt+Page Up

Moves focus one screen to the right/left (if possible).

Ctrl+Page Down /

Ctrl+Page Up

Moves focus to the next sheet to the right/left in sheet tabs if there are more sheets in that direction.

Tab /

Shift+Tab

Moves focus to the next cell on the right/left.

Enter /

Shift+Enter

Moves focus down/up one cell (unless you have changed this action, as described in the following subsection).

Customizing the Enter key

You can choose the direction in which the Enter key moves the cell focus by going to Tools > Options > LibreOffice Calc > General. Use the first three options under Input Settings (Figure 12) to change the Enter key settings. Select the direction cell focus moves from the drop-down list. Depending on the file being used or the type of data being entered, setting a different direction can be useful. The Enter key can also be used to switch into and out of editing mode. In Calc, when the content of a cell is copied to the clipboard, you can paste the information in another cell by pressing the Enter key; here you can disable this feature.

Figure 12: Customizing the Enter key

Image5

Selecting items in a spreadsheet

Selecting cells

Single cell

Click in the cell. You can verify the selection by looking in the Name Box on the Formula Bar (Figure 3).

Range of contiguous cells

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

To select a range of cells by dragging the mouse pointer:

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 left mouse button.

To select a range of cells without dragging the mouse:

1)  Click in the cell which is to be one corner of the range of cells.

2)  Move the mouse to the opposite corner of the range of cells.

3)  Hold down the Shift key and click.

To select a range of cells using Extending selection mode:

1)  Click in the cell which is to be one corner of the range of cells.

2)  Click in the Selection mode field on the Status Bar (Figure 4 above) and select Extending selection.

3)  Click in the cell in the opposite corner of the range of cells.

Tip

Make sure to change back to Standard selection mode or you may find yourself extending a cell selection unintentionally.

To select a range of cells without using the mouse:

1)  Select the cell that will be one of the corners in the range of cells.

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

To select a range of cells using the Name Box:

1)  Click in the Name Box on the Formula Bar (Figure 3 above).

2)  Enter the cell reference for the upper left-hand cell, followed by a colon (:), and then the lower right-hand cell reference, then press the Enter key. For example, to select the range that would go from A3 to C6, 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 above.

2)  Move the mouse pointer 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.

To select a range of cells using Adding selection mode:

1)  Click in the Selection mode field on the Status Bar (Figure 4 above) and select Adding selection.

2)  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 above). 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 first column or row in the group.

2)  Hold down the Shift key.

3)  Click the last column or row in the group.

To select multiple columns or rows that are not contiguous:

1)  Click on the first column or row in the group.

2)  Hold down the Ctrl key.

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

Tip

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

Entire sheet

To select the entire sheet, click on the small box between the column headers and the row headers (Figure 13), use the key combination Ctrl+A, press Ctrl+Shift+Space, or go to Edit on the Menu bar and select Select All.

Figure 13: Select All box

graphics145

Selecting sheets

You can select either one or multiple sheets in Calc. It can be advantageous to select multiple sheets, especially when you want to make changes to many sheets at once.

Single sheet

Click on the sheet tab for the sheet you want to select. The tab for the selected sheet becomes highlighted.

Multiple contiguous sheets

To select multiple contiguous sheets:

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

2)  While holding down the Shift key, click on the sheet tab for the last desired sheet.

3)  All tabs between these two selections will be highlighted. Any actions that you perform will now affect all highlighted sheets.

Multiple non-contiguous sheets

To select multiple non-contiguous sheets:

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

2)  While holding down the Ctrl key, click on the sheet tabs for other desired sheets.

3)  The selected tabs will be highlighted. Any actions that you perform will now affect all 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.

Tip

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

When you insert columns or rows, the cells take the formatting of the corresponding cells in the column to the left or the row above.

Single column or row

Using the Sheet menu:

1)  Select a cell, column, or row where you want the new column or row inserted.

2)  Go to Sheet on the Menu bar. For columns, select Sheet > Insert Columns and then select Columns Before or Columns After. For rows, select Sheet > Insert Rows and then select Rows Above or Rows Below.

Using the context menu:

1)  Select a column or row where you want the new column or row inserted.

2)  Right-click the column or row header.

3)  Select Insert Columns Before / After or Insert Rows Above / Below in the context menu.

Multiple columns or rows

Multiple columns or rows can be inserted at once rather than inserting them one at a time.

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. The number of columns or rows highlighted will be inserted.

Hiding columns and rows

To hide columns or rows from view, select the columns or rows to hide and do one of the following:

Tip

For a visible indication of hidden rows and columns, enable the option from the Menu bar, View > Hidden Row/Column Indicator.

To unhide columns or rows, select the entire sheet or the columns or rows around the columns or rows you wish to unhide and do one of the following:

Deleting columns and rows

Single column or row

To delete a single column or row, do one of the following:

Figure 14: Delete Cells dialog

Image13

Multiple columns or rows

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

Deleting cells

1)  Select the cell or cells you want to delete.

2)  Select Sheet > Delete Cells, press Ctrl+-, or right-click on one of the selected cells and select Delete in the context menu.

3)  Select the option you require from the Delete Cells dialog and click OK.

Working with sheets

Inserting new sheets

Click on the + symbol next to the sheet tabs to insert a new sheet after the last sheet in the spreadsheet without opening the Insert Sheet dialog. The following methods open the Insert Sheet dialog (Figure 15) where you can position the new sheet, create more than one sheet, name the new sheet, or select a sheet from a file.

Figure 15: Insert Sheet dialog

Image12

Moving and copying sheets

You can move or copy sheets within the same spreadsheet by dragging and dropping or using the Move/Copy Sheet dialog (Figure 16). To move or copy a sheet into a different spreadsheet, use the Move/Copy Sheet dialog.

Dragging and dropping

To move a sheet to a different position within the same spreadsheet, click on the sheet tab and drag it to its new position before releasing the mouse button.

To copy a sheet within the same spreadsheet, hold down the Ctrl key then click on the sheet tab and drag it to its new position before releasing the mouse button. The mouse pointer may change to include a plus sign depending on the setup of your operating system.

Using Move/Copy Sheet dialog

The Move/Copy Sheet dialog allows you to specify exactly whether you want the sheet in the same or a different spreadsheet, its position within the spreadsheet, and the sheet name when it is moved or copied.

1)  In the current document, right-click on the sheet tab you wish to move or copy and select Move or Copy Sheet in the context menu, or go to Sheet > Move or Copy Sheet on the Menu bar.

2)  Select Move to move the sheet or Copy to copy the sheet.

3)  Select the spreadsheet where you want the sheet to be placed from the To document drop-down list. This can be the same spreadsheet, another spreadsheet that is already opened, or you can create a new spreadsheet.

4)  Select the position in Insert before where you want to place the sheet.

5)  Type a name in the New name text box if you want to rename the sheet when it is moved or copied. When copying, Calc suggests a default name (Sheet1_2, Sheet2_2, and so on).

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

Figure 16: Move/Copy Sheet dialog

Image14

Caution

When you move or copy to another spreadsheet or to a new one, a conflict may occur if formulas are linked to sheets in the previous location.

Deleting sheets

To delete a single sheet, right-click on the sheet tab you want to delete and select Delete Sheet in the context menu, or go to Sheet > Delete Sheet on the Menu bar. Click Yes to confirm the deletion.

To delete multiple sheets, select the sheets (see “Selecting sheetsabove), then right-click one of the sheet tabs and select Delete Sheet in the context menu, or go to Sheet > Delete Sheet on the Menu bar. Click Yes to confirm the deletion.

Hiding and showing sheets

Sometimes you may want to hide the contents of a sheet to preserve data from accidental editing or because its contents are not important to display.

To hide a sheet or many sheets, select the sheet or sheets as above, right-click to open the context menu, and select Hide Sheet.

To show hidden sheets, right-click any sheet tab and select Show Sheet in the context menu. A dialog will open with all hidden sheets listed. Select the desired sheets and then click OK.

Note

LibreOffice Calc does not let you hide the last visible sheet.

Renaming sheets

By default, the name for each new sheet added is SheetX, where X is the number of the next sheet to be added. While this works for a spreadsheet with only a few sheets, it can become difficult to identify sheets when a spreadsheet contains many sheets.

You can rename a sheet using one of the following methods:

Note

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.

Viewing a spreadsheet

Changing document view

Use the zoom function to show more or fewer cells in the window when you are working on a spreadsheet. For more about zoom, see Chapter 1, Introducing LibreOffice, in the Getting Started Guide.

Freezing rows and columns

Freezing is used to lock rows across the top of a spreadsheet or to lock columns on the left of a spreadsheet. Then, when moving around within a sheet, the cells in frozen rows and columns always remain in view.

Figure 17 shows some frozen rows and columns. The heavier horizontal line between rows 3 and 23 and the heavier vertical line between columns F and Q indicate that rows 1 to 3 and columns A to F are frozen. The rows between 3 and 23 and the columns between F and Q have been scrolled off the page. To freeze rows or columns:

1)  Click on the row header below the rows you want the freeze or click on the column header to the right of the columns where you want the freeze. To freeze both rows and columns, select the cell (not a row or column) that is below the row and to the right of the column that you want to freeze

2)  Go to View on the Menu bar and select Freeze Rows and Columns. A heavier line appears between the rows or columns indicating where the freeze has been placed.

Figure 17: Frozen rows and columns

Image7

Unfreezing

To unfreeze rows or columns, go to View on the Menu bar and click Freeze Rows and Columns to toggle it off. The heavier lines indicating freezing will disappear.

Splitting the screen

Another way to change the view is by splitting the screen displayed (also known as splitting the window). The screen can be split horizontally, vertically, or both, displaying up to four portions of the spreadsheet at the same time. An example of splitting the screen is shown in Figure 18 where a split is indicated by a gray line.

This could be useful for example, when a large spreadsheet has one cell with a number that is used by three formulas in other cells. Using the split-screen technique, the cell containing the number can be positioned in one section of the view and the cells with formulas can be seen in the other sections. This makes it easy to see how changing the number in one cell affects each of the formulas.

Figure 18: Split screen example

graphics12

Splitting horizontally or vertically

There are two ways to split a screen horizontally or vertically:

Method One:

1)  Click on the row header below the rows where you want to split the screen horizontally or click on the column header to the right of the columns where you want to split the screen vertically.

2)  Go to View on the Menu bar and select Split Window or right-click and choose Split Window in the context menu. A thick line appears between the rows or columns indicating where the split has been placed. An example of a split line is shown below Row 2 in Figure 18.

Method Two:

For a horizontal split, click on the thick black line at the top of the vertical scroll bar (Figure 19) and drag the split line below the row where you want the horizontal split positioned.

Similarly, for a vertical split, click on the thick black line at the right of the horizontal scroll bar (Figure 19) and drag the split line to the right of the column where you want the vertical split positioned.

Figure 19: Split screen bars

graphics16

Splitting both horizontally and vertically

Method One:

Position both the black horizontal and the black vertical lines as described above and as shown in Figure 19.

Method Two:

1)  Click the cell that is immediately below the rows where you want to split the screen horizontally and immediately to the right of the columns where you want to split the screen vertically.

2)  Go to View on the Menu bar and select Split Window. Thick lines appear between the rows and columns indicating where the splits have been placed.

Removing split views

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

Using the Navigator

The Navigator (Figure 20) is available in all LibreOffice modules. It provides tools and methods to move quickly through a spreadsheet and find specific items.

The Navigator categorizes and groups spreadsheet objects which you can click on to move quickly to that object. If an indicator (plus sign or triangle, dependent on computer setup) appears next to a category, at least one object in this category exists. To open a category and see the list of items, click on the indicator. When a category is showing the list of objects in it, double-click on an object to jump directly to that object’s location in the spreadsheet.

To open the Navigator, do one of the following:

Figure 20: Navigator dialog in Calc

Image10

The controls and tools available in the Navigator are as follows:

Tip

Ranges, scenarios, pictures, and other objects are much easier to find if you have given them informative names when creating them, instead of keeping the default Calc names, for example Scenario 1, Image 1, Image 2, Object 1, and so on. These default names may not correspond to the position of the object in the document.

Using document properties

To open the Properties dialog for a document, go to File > Properties on the Menu bar. The Properties dialog provides information about the spreadsheet and allows you to set some of its properties. The dialog is shown in Figure 21 and its tabs are described below.

Figure 21: Properties dialog, General tab

Image3

General

Contains basic information about the current file.

Description

Contains optional editable descriptive information about the spreadsheet.

Custom Properties

Use this page to assign custom information fields to the spreadsheet. In a new spreadsheet, this page may be blank. If the new spreadsheet is based on a template, this page may contain fields. You can change the name, type, and contents of each row. The information in the fields will be exported as metadata to other file formats.

Click Add Property to add a new custom property. Use the red “X” button at the end of an entry to delete the custom property.

CMIS Properties

Only relevant for spreadsheets stored on remote servers. See the Help or the Getting Started Guide for more information.

Security

Enables two password-protected security options.

Font

When Embed fonts in the document is selected, any fonts used in the spreadsheet will be embedded into the document when it is saved. This may be useful if you are creating a PDF of the spreadsheet and want to control how it will look on other computer systems.

Only embed fonts that are used in documents – If fonts have been defined for the spreadsheet (for example, in the template), but have not been used, select this option to not embed them.

Font scripts to embed – You can choose which types of fonts are embedded: Latin, Asian, Complex. See the Getting Started Guide for more information.

Statistics

Displays statistics for the current file: the number of sheets, cells, pages, and formula groups.

Contents