Trine Office - Tutorials

1>. Rotating Text

  1. Select the cells whose text you want to rotate.

  2. Choose Format - Cells. You will see the Format Cells dialog.

  3. Click the Alignment tab.

  4. In the Text orientation area use the mouse to select in the preview wheel the direction in which the text is to be rotated. Click OK.
     

2>. Writing Multi-line Text

 

Pressing the Ctrl+Enter keys inserts a manual line break. This shortcut works directly in the cell or in the input line. The input line can be expanded to the multi-line by the Down arrow button on the right.

If you want the text to automatically break at the right border of the cell, proceed as follows:

  1. Select all the cells where you want the text to break at the right border.

  2. In Format - Cells - Alignment, mark the Wrap text automatically option and click OK.

For automatic wrapping in XLS files, the rows in question should be set to Optimal Height.

3>. Formatting Numbers as Text

You can format numbers as text in Trine Office Calc. Open the context menu of a cell or range of cells and choose Format Cells - Numbers, then select "Text" from the Category list. Any numbers subsequently entered into the formatted range are interpreted as text. The display of these "numbers" is left-justified, just as with other text.

If you have already entered normal numbers in cells and have afterwards changed the format of the cells to "Text", the numbers will remain normal numbers. They will not be converted. Only numbers entered afterwards, or numbers which are then edited, will become text numbers.

If you decide to enter a number directly as text, enter an apostrophe (') first. For example, for years in column headings, you can enter '1999, '2000 and '2001. The apostrophe is not visible in the cell, it only indicates that the entry is to be recognized as a text. This is useful if, for example, you enter a telephone number or postal code that begins with a zero (0), because a zero (0) at the start of a sequence of digits is removed in normal number formats.


4>.Text Superscript / Subscript

  1. In the cell, select the character that you want to put in superscript or subscript.

    If, for example, you want to write H20 with a subscript 2, select the 2 in the cell (not in the input line).

  2. Open the context menu for the selected character and choose Character. You will see the Character dialog.

  3. Click the Font Position tab.

  4. Select the Subscript option and click OK.

     

5>. Changing Row Height or Column Width

You can change the height of the rows with the mouse or through the dialog.

What is described here for rows and row height applies accordingly for columns and column width.

 

Using the mouse to change the row height or column width

  • Click the area of the headers on the separator below the current row, keep the mouse button pressed and drag up or down in order to change the row height.

  • Select the optimal row height by double-clicking the separator below the row.

Using the dialog to change the row height or column width

  1. Click the row so that you achieve the focus.

  2. Start the context menu on the header at the left-hand side.

    You will see the commands Row Height and Optimal row height. Choosing either opens a dialog.

 

6>. Highlighting Negative Numbers

You can format cells with a number format that highlights negative numbers in red. Alternatively, you can define your own number format in which negative numbers are highlighted in other colors.

  1. Select the cells and choose Format - Cells.

  2. On the Numbers tab, select a number format and mark Negative numbers red check box. Click OK.

The cell number format is defined in two parts. The format for positive numbers and zero is defined in front of the semicolon; after the semicolon the formula for negative numbers is defined. You can change the code (RED) under Format code. For example, instead of RED, enter YELLOW. If the new code appears in the list after clicking the Add icon, this is a valid entry.

 

7>. Assigning Formats by Formula

The STYLE() function can be added to an existing formula in a cell. For example, together with the CURRENT function, you can color a cell depending on its value. The formula =...+STYLE(IF(CURRENT()>3; "Red"; "Green")) applies the cell style "Red" to cells if the value is greater than 3, otherwise the cell style "Green" is applied.

If you would like to apply a formula to all cells in a selected area, you can use the Find & Replace dialog.

  1. Select all the desired cells.

  2. Select the menu command Edit - Find & Replace.

  3. For the Find term, enter: .*

    ".*" is a regular expression that designates the contents of the current cell.

  4. Enter the following formula in the Replace field: =&+STYLE(IF(CURRENT()>3;"Red";"Green"))

    The "&" symbol designates the current contents of the Find field. The line must begin with an equal sign, since it is a formula. It is assumed that the cell styles "Red" and "Green" already exist.

  5. Mark the fields Regular expressions and Current selection only. Click Find All.

    All cells with contents that were included in the selection are now highlighted.

  6. Click Replace all.

8>. Entering a Number with Leading Zeros

There are various ways to enter integers starting with a zero:

  • Enter the number as text. The easiest way is to enter the number starting with an apostrophe (for example, '0987). The apostrophe will not appear in the cell, and the number will be formatted as text. Because it is in text format, however, you cannot calculate with this number.

  • Format a cell with a number format such as \0000. This format can be assigned in the Format code field under the Format - Cells - Numbers tab, and defines the cell display as "always put a zero first and then the integer, having at least three places, and filled with zeros at the left if less than three digits".

 

If you want to apply a numerical format to a column of numbers in text format (for example, text "000123" becomes number "123"), do the following:

  1. Select the column in which the digits are found in text format. Set the cell format in that column as "Number".

  2. Choose Edit - Find & Replace

  3. In the Find box, enter ^[0-9]

  4. In the Replace box, enter &

  5. Check Regular expressions

  6. Check Current selection only

  7. Click Replace All

9>. Formatting Spreadsheets

Formatting Text in a Spreadsheet

  1. Select the text you want to format.

  2. Choose the desired text attributes from the Formatting Bar. You can also choose Format - Cells. The Format Cells dialog will appear in which you can choose various text attributes on the Font tab page.

Formatting Numbers in a Spreadsheet

  1. Select the cells containing the numbers you want to format.

  2. To format numbers in the default currency format or as percentages, use the icons on the Formatting Bar. For other formats, choose Format - Cells. You can choose from the preset formats or define your own on the Numbers tab page.

Formatting Borders and Backgrounds for Cells and Pages

  1. You can assign a format to any group of cells by first selecting the cells (for multiple selection, hold down the Ctrl key when clicking), and then activating the Format Cells dialog in Format - Cells. In this dialog, you can select attributes such as shadows and backgrounds.

  2. To apply formatting attributes to an entire sheet, choose Format - Page. You can define headers and footers, for example, to appear on each printed page.

An image that you have loaded with Format - Page - Background is only visible in print or in the print preview. To display a background image on screen as well, insert the graphic image by choosing Insert - Image - From File and arrange the image behind the cells by choosing Format - Arrange - To Background. Use the Navigator to select the background image.

10>. Naming Cells

Allowed names

Names in Calc can contain letters, numeric characters, and some special characters. Names must start with a letter or an underline character.

Allowed special characters:

  • underline (_)

  • period (.) - allowed within a name, but not as first or last character

  • blank ( ) - allowed within a name, but not as first or last character, and not for a cell range

Names must not be the same as cell references. For example, the name A1 is invalid because A1 is a cell reference to the top left cell.

Names must not start with the letters C or R followed by a number; also single characters C and R are not allowed as names. See the ADDRESS function for more information.

Names for cell ranges must not include blanks. Blanks are allowed within names for single cells, sheets and documents.

Naming cells and formulas

A good way of making the references to cells and cell ranges in formulas legible is to give the ranges names. For example, you can name the range A1:B2 Start. You can then write a formula such as "=SUM(Start)". Even after you insert or delete rows or columns, LibreOffice still correctly assigns the ranges identified by name. Range names must not contain any spaces.

For example, it is much easier to read a formula for sales tax if you can write "= Amount * Tax_rate" instead of "= A5 * B12". In this case, you would name cell A5 "Amount" and cell B12 "Tax_rate."

Use the Define Names dialog to define names for formulas or parts of formulas you need more often. In order to specify range names,

  1. Select a cell or range of cells, then choose Sheet - Named Ranges and Expressions - Define. The Define Names dialog appears.

  2. Type the name of the selected area in the Name field. Click Add. The newly defined name appears in the list below. Click OK to close the dialog.

You can also name other cell ranges in this dialog by entering the name in the field and then selecting the respective cells.

If you type the name in a formula, after the first few characters entered you will see the entire name as a tip.

  • Press the Enter key in order to accept the name from the tip.

  • If more than one name starts with the same characters, you can scroll forward through all the names using the Ctrl + Tab keys and backward using the Shift + Ctrl + Tab keys.

 

11>. Renaming Sheets

Setting sheet names is an important feature to produce readable and understandable spreadsheets documents.

The name of a sheet is independent of the name of the spreadsheet. You enter the spreadsheet name when you save it for the first time as a file.

To rename a sheet in your document:

  1. Double-click the sheet tab or open its context menu and choose Rename Sheet. A dialog box appears where you can enter a new name.

  2. Enter a new name for the sheet and click OK.

  3. Alternatively, hold down the Alt key and click on any sheet name and enter the new name directly.

The document can contain up to 10,000 individual sheets, which must have different names.

 

Sheet Naming Restrictions

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 [

  • right square bracket ]

  • single quote ' as the first or last character of the name

The single quote is Unicode U+0027, also known as apostrophe. Other single-quote characters, similar to apostrophe, are allowed, such as ʼ and .

Using a Default Prefix for Sheet Names

You can set a prefix for the names of new sheets you create. Choose Tools - Options - LibreOffice Calc - Defaults and enter the prefix name in Prefix name for new worksheet.

Referencing Sheet Names with Special Characters

In cell references, a sheet name must be enclosed in single quotes ' when the name contains other characters than alphanumeric or underscore. A single quote contained within a name has to be escaped by doubling it (two single quotes).

For example, you want to reference the cell A1 on a sheet named This year's sheet.

The reference must be enclosed in single quotes, and the one single quote inside the name must be doubled: 'This year''s sheet'.A1


×