Tables
involving tables
Tables
are like one special paragraph so when selecting text using the
keyboard (Shift+arrow)
from, say, above the paragraph, the whole table is selected followed
by the line below it.
The
location for displaying the table grid when a table has no borders is
not particularly intuitive: use Tools
> Options > OpenOffice.org > Appearance and
select the Table
boundaries checkbox.
Heading
rows
By
default new tables have a heading row. This default behavior can be
changed by Tools > Options
> OpenOffice.org Writer > Table.
When
creating a new table using Table
> Insert Table, you
can choose to turn on or off the heading row, by checking Heading
in Options > OpenOffice.org Writer > Table
Whether
the top row(s) repeat at the start of each new page can be altered by
selecting the relevant top row(s) > Table
> Repeat on each page.
This does not change the format of the rows, only whether they repeat
at each page break.
Adjusting
column widths and row heights using the keyboard
The
different methods of adjusting the column width available via Tools
> Options > OpenOffice.org Writer > Table are:
Fixed:
Overall width of the table stays the same, but the adjoining column
shrinks or grows correspondingly.
Fixed
Proportional: The current column and the end column
change by corresponding amounts, keeping the overall width the same.
Variable:
Only the current column changes so the overall width of the table
changes.
Use
Alt and the arrow keys as follows to adjust the width of columns (or
height of rows):
Alt
and arrow keys adjusts the right side (bottom for rows).
Alt+Shift
and arrow keys adjusts the left side (top for
rows).
Alt+Control+left
or right arrow keys adjusts the current cell only.
Copying
and pasting cells in a table
Writer
never inserts new rows or columns when pasting data, it always
overwrites the contents of the cells. This makes it clear as to what
will happen. To avoid overwriting cells, first insert the required
number of rows or columns.
Inserting
and deleting rows or columns
If
you use Table > Insert >
Row or Table >
Insert > Column or
right-click > Insert Row
or Insert Column,
you can choose whether to insert before or after the current row or
column.
The
icons on the Table toolbar insert below for rows and to the right for
columns (opposite of Word).
Note
|
This
is a surprising inconsistency as Calc inserts above and to the
left.
|
In
Linux, to insert rows or columns using the keyboard: Alt+Insert
> arrow key (this is hold down Alt
and Insert
keys together, release the keys, then press the arrow key). To delete
rows or columns using the keyboard: Alt+Delete
> arrow key. The insertion or deletion is in the
direction of the arrow key. For example, Alt+Insert
> Up
inserts a row above the current row.
Equal
row heights and column widths
On
the Table
toolbar there is a long click button called
Optimize. The
Optimize button becomes active when more than one cell is selected.
This presents a tear-off menu for easily adjusting row heights and
column widths to being the same.
Splits
and merges
Merge
cells last, as you would in Word.
To
merge cells: Select cells to be merged >
Table > Merge cells (or use the Merge cells
button on the Table
toolbar).
To
split cells: Select merged cells >
Table > Split cells (or use the Split cells
button on the Table
toolbar).
To
split a table (horizontally): Table
> Split Table.
To
join two tables, they need to be one below the other, then Table
> Merge Table. If there is a table above and below the
current table you will be prompted for which one you wish to join.
Sorting
To sort a table:
Select
the cells to be sorted; do not include the headings. The option to
sort only becomes available when something is selected.
Tools
> Sort.
Unlike
Word, the sort dialog uses column number rather than the names of the
column.
Entering
numbers and formulas
Unlike
Word, tables in Writer can work much more like spreadsheets. For
example, calculated values change as the data is input (no more
selecting and pressing F9
to update calculated results).
With
number recognition turned on, when entering a number Writer will
automatically format the number according to a specified number
format. To change this behavior, right-click when the cursor is in a
table and click on Number
Recognition to deselect it.
To
change the number format, select the cells, Table
> Number Format.
To
enter a formula like SUM():
Select
the cell where the result is to go.
Press
F2
to display the Formula
bar.
Click
and hold the Formula
button to display the formula menu.
Select
the desired function (list separator is for separating constants,
for example =mean 5 | 12 | 20).
Click
and drag on cells to input ranges.
Press
Enter
to finish.
To
enter a formula like “this cell plus that cell minus that cell”:
Select
the cell where the result is to go.
Press
F2
to display the Formula
bar.
Click
on a cell.
Type
or select the desired operator.
Click
on the next cell.
Repeat
steps 4 and 5 until done.
Press
Enter
to finish.
Creating
a table from a data source
To
create a table from a data source:
Display
the Data source viewer (F4).
In
the Data explorer window, navigate to the desired table or query.
Drag
the name of the table or query into the document.
Select
the desired fields and set other properties as required in the
dialog.