Chapter 4. Objects

Tables

Create a table ready for text insertion

A table is a grid comprising a number of rows and columns. These may or may not have borders. Each cell of the table may contain text or objects such as graphic images and may be formatted independently of the other cells.

Insert a table

  1. Click on the position in the document where you wish to insert the table.

  2. Insert->Table

  3. Writer will call the tables Table 1, Table 2, and so on. You may give the tables a name of your own choice. Enter this in the Name window.

  4. Adjust the Columns spin box to set the number of columns and the Rows spin box to set the number of rows.

  5. Tick the Border check box if you wish to include borders around the cells. Otherwise clear this box.

  6. If you wish to keep the entire table on one page, tick the Don't split table check box. Writer will then move the entire table to the following page if it will not fit on the current page.

  7. Click OK.

The following table was created using three columns and two rows.

     
     
  1. Click in the cell in which you wish to enter text and enter and format the text as usual.

  2. Click Tab to jump to the next cell or click on another cell to reposition the cursor.

Insert, edit data in a table

Data can be entered into a cell by clicking on the cell and typing in the text in the usual way. Formatting is performed as with ordinary text.

If a cell already contains text, you may click anywhere in the cell and insert, delete, edit or reformat the text as in the rest of a document.

Select rows, columns, cells, entire table

At times we may wish to perform operations on entire rows or columns or the whole table. For example, we may wish to change the current font for the entire table. To do this we need to select the appropriate row(s) or column(s) or the table itself.

Select entire table

  1. Position the cursor anywhere in the table.

  2. If the current cell is empty, press Ctrl+A. Otherwise press Ctrl+A a second time.

[Note] Note

The action of Ctrl-A is somewhat complex. If the cell is not empty, pressing this combination selects the current cell. In this case, pressing it a second time selects the entire table. Once the table has been selected, pressing Ctrl-A once more causes the entire document to be selected.

Select rows in a table

Writer does not have a single step method for selecting rows or columns. To select a number of rows, proceed as follows:

  1. Go the the start of the first cell of the first row.

  2. Press Shift+Right arrow repeatedly until all the cells of the first row have been selected.

  3. Press Shift+Down arrow repeatedly until all the rows have been selected.

Select columns in a table

The method for selecting columns is very similar.

  1. Go to the start of the first cell f the first column.

  2. Press Shift+Down arrow repeatedly until the first column has been selected.

  3. Press Shift+Right arrow repeatedly until all the columns have been selected.

Insert, delete, rows and columns

Delete a row

  1. Position the cursor anywhere in the row to be deleted.

  2. Format->Row->Delete or press the Delete row icon on the Table object bar, .

When the cursor is inside a table, the Table object bar will show table functions.

Delete a column

  1. Position the cursor anywhere in the column to be deleted.

  2. Format->Column->Delete or press the Delete column icon, .

Insert a row

  1. Position the cursor anywhere in the row adjacent to the new row.

  2. Format->Row->Insert or press the Insert row icon, .

  3. Adjust the Amount spin window to the number of rows you wish to insert.

  4. Click either the Before or After radio button to select whether you wish the new rows to be inserted before or after the current row.

  5. Click OK.

Insert a column

  1. Position the cursor anywhere in the column adjacent to the new column.

  2. Format->Column->Insert or press the Insert column icon, .

  3. Adjust the Amount spin window to the number of columns you wish to insert.

  4. Click either the Before or After radio button to select whether you wish the new columns to be inserted before or after the current column.

  5. Click OK.

Modify column width, row height

When you create a table, Writer uses the default row heights and column widths. The row height will be based on the default font and the columns widths will be adjusted to fit equally across the page. This is shown on the following screen.

If you change a font, the row height for all the cells will adjust to accommodate the largest font on the row as shown on the next screen.

Row heights

Set the height of rows manually

You may set custom row heights manually as follows:

  1. Select cells in each of the rows you wish to adjust.

  2. Format->Row->Height, or right click on the table.

  3. Adjust the value using the Height spin window or typing a value in.

Set optimal row height

Optimal row height is the most appropriate row height based on the size of the fonts used in the row.

  1. Select cells in each of the rows you wish to adjust.

  2. Format->Row->Optimal Height.

Set row height using the keyboard
  1. Position the cursor in the row whose height you wish to adjust.

  2. Hold down the Alt key and press the Up and Down arrows to decrease or increase the height.

Column widths

Set column widths manually

The Format menu option lets you set the width of a single column.

  1. Click in the table.

  2. Format->Column->Width.

  3. Select the column using the Column spin window.

  4. Adjust the width of the column using the Width spin window.

  5. Click OK.

Set column widths equally
  1. Select cells in the columns you wish to change.

  2. Format->Column->Space equally or press the icon on the Table object bar.

Set optimal column widths

This will adjust the column widths based on the text inside the cells of the selected columns.

  1. Select cells in each of the rows you wish to adjust.

  2. Format->Column->Optimal Width.

Set column width by dragging the border
  1. Move the cursor over the border of the cell to display the separator icon.

  2. Hold down the left mouse button. A dotted vertical line will be displayed.

  3. Hold down the left mouse button and drag the vertical line.

  4. Release the left mouse button at the desired position.

Set the column width using the keyboard
  • Position the cursor in any cell in the column. Hold down the Alt key and press the Left or Right arrows. This will also adjust the overall width of the table.

OR

  • Position the cursor in any cell in the column. Hold down the Alt+Ctrl keys and press the Left or Right arrows. This will not change the overall width of the table.

Modify cell border width, style, colour

By default, Writer will insert and thin, black solid line as the table border. These can be changed as follows:

  1. Click inside the table.

  2. Format->Table. This will display the Table format dialogue.

  3. Click the Borders tab.

  4. Select a border thickness and style in the Style window.

  5. Click on the Color window to display a drop down list of border colours and select a colour.

  6. You may also may also select a shadow for the outer border of the table by selecting the appropriate options in the Shadow style area of the dialogue. This is covered in the next section.

Set the border of individual cells or blocks of cells

The previous description applied to formatting an entire table. You may use the same method to set the borders of individual cells or blocks of cells.

  1. Select the cells whose borders you wish to set.

  2. Format->Table

  3. Click the Borders tab.

  4. Set the borders as you wish.

  5. Click OK.

In this case the settings will only apply to the cells that were selected. The following screen illustrates the effect.

In this case the four cells in the heading were highlighted before the command was executed.

Add shading to cells

The background colour of a cell is referred to as the fill colour. By default there is no fill. This can be changed.

  1. Click inside the cell you want to change or select a range.

  2. Format->Table

  3. Click the Background tab.

  4. Select a Background color from the colour palette.

  5. Click on the For drop down window and select Cell to apply only to the selected cells or Row to apply to the currently selected rows.

  6. Click OK.

Put a shadow on the table

You may insert a shadow around the outer border of the table.

  1. Click in the table you wish to format.

  2. Format->Table

  3. Click the Borders tab.

  4. Select the position of the shadow from one of the Shadow options in the Shadow style area.

  5. Select the offset of the shadow by using the Distance spin window.

  6. Select the colour of the shadow by clicking on the Color drop down window and selecting a colour.

  7. Click OK.

Some other important table functions

Merge cells

Suppose we have a situation such as shown on the next screen.

We would like the word TEAM to be centred across the four headings. The solution is to merge the four cells and then centre the heading within this new cell.

  1. Highlight the cells to be merged.

  2. Format->Cell->Merge or click the Merge icon on the Table object bar, .

  3. Click the Centre icon on the Object bar.

Split cells

You may split cells horizontally or vertically.

  1. Select the cells you wish to split.

  2. Format->Cell->Split cells or click on the Split cells icon .

  3. Select the number of elements you wish to split the cells into.

  4. Select either Horizontally or Vertically.

  5. Click OK.

Split table

You may split a table horizontally at the current cursor position.

  1. Click in the table at the point where you wish to split it.

  2. Format->Split table

  3. Click No heading.

  4. Click OK.

    This insert a blank row between the two parts of the table. Each part can now be treated as a separate table

Set background colour

The background colour of a table is referred to as the fill colour. By default there is no fill. This can be changed.

  1. Click inside the table.

  2. Format->Table

  3. Click the Background tab.

  4. Select a Background color from the colour palette.

  5. Click on the For drop down window and Table if you wish to apply this background to the entire table.

  6. Click OK.