Contents
Calc is the LibreOffice spreadsheet and data plotting module. Spreadsheets consist of a number of sheets, containing cells which can be filled with elements like text, numbers, or formulas. A formula can manipulate data from other cells to generate a value for the cell in which it is inserted. Calc also allows you to define ranges, filter and sort the data or creates charts from the data to present it graphically. By using DataPilots, you can combine, analyze or compare larger amounts of data.
As with the entire OpenOffice.org suite, Calc can be used across a variety of platforms. It provides a number of exchange formats (including export to PDF documents), and can also read and save files in Microsoft Excel's format. Its interoperability is constantly ameliorated.
This chapter can only introduce some very basic Calc functionalities. For more information and for complete instructions, look at the LibreOffice help or at the sources listed in Section 1.10, “For More Information”.
![]() | VBA Macros |
|---|---|
Calc can process many VBA macros in Excel documents; however, support for VBA macros is not yet complete. When opening an Excel spreadsheet that makes heavy use of macros, you might discover that some do not work. | |
There are two ways to create a new Calc document:
From Scratch. To create a document from scratch, click ++ and a new empty Calc document is created.
Templates. To use a template, click ++ and open . You can see a list of Spreadsheet templates. Select the one that fits your needs and your new document is created based on the style of your selected template.
Access the individual sheets by clicking the respective tabs at the bottom of the window.
Enter data in the cells as desired. To adjust the appearance, either use the toolbar or the menu—or define styles as described in Section 3.2, “Using Formatting and Styles in Calc” . Use the menu or the relevant buttons in the toolbar to print and save your document.
Calc comes with a few built-in cell and page styles to improve the appearance of your spreadsheets and reports. Although these built-in styles are adequate for many uses, you will probably find it useful to create styles for your own frequently used formatting preferences.
Procedure 3.1. Creating a Style¶
Click +.
In the window, click either the or the icon from the top of the window.
Right-click in the window, then click .
Specify a name for your style and use the various tabs to set the desired formatting options.
Click .
Procedure 3.2. Modifying a Style
Click +.
In the window, click either the or the icon.
Right-click the name of the style you want to change, then click .
Change the desired formatting options.
Click OK.
To apply a style to specific cells, select the cells you want to format. Then double-click the style you want to apply in the window.
Sheets are a good method to organize your calculations. For example, the accounting for your business is much clearer if you create a sheet for each month.
To insert a new sheet in your spreadsheet, do the following:
Procedure 3.3. Inserting New Sheets
Select + from the main menu. A dialog box opens.
Decide whether the new sheet should be positioned before or after the selected sheet.
If you want to create a new sheet, make sure the radio button is activated. Enter the number of sheets and the sheet name. Skip the next step.
If you want to import a sheet from another file, do the following otherwise skip this step:
Select and click
Select the filename and confirm with . All the sheet names are now displayed in the list.
Select the sheet names you want to import by holding the Shift key.
Confirm with to import the sheet names you selected.
To rename a sheet, right-click a sheet in the sheet tab and select .
To delete the current sheet, select ++ and confirm with . It is possible to delete more than one sheet by holding the Shift key and selecting the sheets you want to delete in the sheet tab. Right-click and choose and the same dialog box appears. Confirm with .
Conditional formatting is a useful feature to highlight certain values in your spreadsheet. For example, define a condition and if the condition is true, a style is applied to each cell that fulfills this condition.
![]() | Enable AutoCalculate |
|---|---|
Before you apply conditional formatting, choose ++. You should see a check mark in front of . | |
Proceed as follows:
Procedure 3.4. Using Conditional Formatting¶
Define a style first. This style is applied to each cell when your condition is true. Use + or press F11. For more information, see Procedure 3.1, “Creating a Style”. Confirm with .
Select the cell range where you want to apply your condition.
Select + from the main menu. A dialog box opens.
Determine your condition. You can define up to three conditions. Each of the three conditions can be enabled or disabled independently. A condition can operate in “cell mode” or in “formula mode”:
The condition is tested if it matches a certain cell value. Beside the first pull-down menu, you can select the operator like equal to, less than, greater than, and so forth.
The condition is tested if a certain formular returns true.
Depending on the mode, enter:
Cell Mode. Select the operator and the value of the cell.
Formular Mode. Select the function which you want to test.
Choose the style you want to apply when this condition is true or click to define a new appearance.
Repeat the previous steps, if you need additional conditions.
Confirm with .
Now the style of your cells has changed.
Grouping a cell range helps to fold your spreadsheet into parts. This makes your spreadsheets more readable as you can display only the parts you are currently interested in. It is possible to group rows or columns and nest groups in other groups.
To group a range, proceed as follows:
Procedure 3.5. Grouping a Selected Cell Range
Select a cell range in your spreadsheet.
Select ++. A dialog box appears.
Decide if you want to group your selected range as row or as column. Confirm with .
After grouping selected cells, a line indicating the grouped cell range appears in the upper-left margin. Fold or unfold the cell range with the and icons. The numbers in the margins display the depth of your groups and can be clicked too.
To ungroup a cell range, click into a cell which belongs to a group and select ++. The line in the margin disappears.
If you have a spreadsheet with lots of data, scrolling makes your header usually disappear. LibreOffice locks rows or colums or both so it remains even if you scroll around.
To freeze a single row or a single column, proceed as follows:
Procedure 3.6. Freezing a Single Row or Column
To freeze a row, click on the header of the row in the left strip.
To freeze a column, click on the header of the column. The header of the column is the strip under the icon bar, labeled as A, B, C and so forth.
Select +. A dark line appears, indicating where the row or column remains.
It is also possible to freeze both, rows and colums. Proceed as follows:
Procedure 3.7. Freezing Row and Column
Click into the cell to the right of the column and below the row you want frozen. For example, if your header occupies the space from A1 to B3 then click into cell C4.
Select +. A dark line appears, indicating where the row or column remains.
If you want to revert the freezing, select + and the check mark disappears.