Data entry and manipulation in tables - DRAFT
- Creating a table
- Formatting the table layout
- Resizing and positioning the table
- Resizing, positioning, and inserting rows and columns
- Merging and splitting cells
- Borders, backgrounds, and boundaries
- Formatting the table text
- Data entry and manipulation in tables
- Additional table operations
- Table menu and toolbar
Moving between cells
Within a table, you can use the mouse, the cursor keys, or the Tab key to move between cells.
The cursor keys move to the next cell only if there is no text in the way. For example, pressing the right cursor key will move the cursor to the right within the text in the current cell, then to the next cell.
The Tab key moves directly to the next cell and, if the cursor is in the last cell in the table, creates a new row. Pressing Shift+Tab moves the cursor back a cell.
To enter a Tab character as part of the text of the cell, press the Control and Tab keys at the same time. |
Sorting data in a table
Just as in a spreadsheet, Writer allows data in a table to be sorted. Up to three levels of sorting can be specified (for example, sort first by age numerically, then alphabetically by name within each age).
To sort data in a table:
Select the table (or part of the table) to be sorted.
From the menu bar, select Table > Sort. In the Sort dialog box:
- Decide whether you want to sort in the direction of rows or columns. The default sorting direction is by rows, which results in sorting the data in a column.
- Select up to three keys to sort on, in the correct order.
- For each key, select which column or row to sort on, whether the sort is Numeric or Alphanumeric and whether it is Ascending or Descending.
- Click OK to perform the sort.
Using spreadsheet functions in a table
In a table in a Writer document, you can use some of the mathematical functions that are normally implemented by OpenOffice.org Calc. For many simple functions, Writer tables can be used as basic spreadsheets.
Just as in a spreadsheet, each table cell is identified by a letter (for the column) and a number (for the row). For example, cell C4 is the cell in the third column from the left and fourth row from the top. When the cursor is in a cell, this cell reference is displayed on the status bar.
For example, suppose you had two numbers in cells <B1> and <C2> and wanted to display the sum of the two in cell <A1>, as shown below.
Do the following:
- Click in cell <A1> and press the = key. The Formula bar appears automatically, near the top of the screen. In the leftmost side of the bar, you can see the coordinates of the selected cell.
- Click in cell <B1>. The identifiers of this cell are automatically displayed in the Formula bar and inserted into cell <A1>.
- Press the + key.
- Click on cell <C2>. You can see the final formula = <B1>+<C2> displayed both in the selected cell and in the Object bar.
- Press the Enter key or click the green tick (checkmark) on the Formula Bar.
To display the list of the mathematical functions that you can use in a table:
- Display the Formula toolbar by pressing F2 or by selecting a blank cell and pressing the = key.
- Click and hold the Formula f(x) icon.
In our example, this gives the result 9 in the top left cell. For contiguous cells, you can simply select the cells in the row, column, or the rectangle of rows and columns. Thus, for example, to add a column of numbers, do this:
- Type an equals sign = in an empty cell.
- Select the cells to be added together—in this case the cells from A2 to A5. The formula should be something like =<A2:A5>.
- Press the Enter key or click the green tick (checkmark) on the Formula Bar.
- The answer appears in the cell you have selected.
When using a function, you can enter the cells manually or by selecting them. Thus, to add up the four numbers that we added above (A2, A3, A4, A5), do this:
- Type an equals sign = in an empty cell.
- Type sum or select it from the function list f(x).
- Select the cells to be added together. The formula should be something like =sum<A2:A5>.
- Press the Enter key or click the green tick (checkmark) on the Formula Bar.
- The answer appears in the cell you have selected.
Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY). |