12 April 2014: The OpenOffice Wiki is not, and never was, affected by the heartbleed bug. Users' passwords are safe and wiki users do not need take any actions.

Creating a table

From Apache OpenOffice Wiki
Jump to: navigation, search


Before you insert a table into a document, it is beneficial to have an estimate of the number of rows and columns required. However, if necessary, you can easily make changes later.

Inserting a new table

To insert a new table, position the cursor where you want the table to appear, then use any of the following methods to open the Insert Table dialog box:

  • From the main menu, select Table > Insert > Table.
  • Press Control+F12.
  • From the Standard toolbar, click the Table icon TableIcon.png.

Insert Table dialog box
Inserting a new table using the Insert Table dialog box

Here you can specify the properties for the new table.

Under Name, you can enter a different name than the OOo-generated default for the table. This might come in handy in case you want the tables displayed in the Navigator in a certain (sorted) way.

Under Size, specify the initial number of columns and rows for the new table. You can change the size of the table later, if necessary.

Under Options, set up the initial table characteristics. Selecting the check boxes in this section of the dialog produces the following results:

  • Heading — Defines the first row(s) in the table as headings. The default Table Heading paragraph style is applied to the heading rows and thus makes the text centered, bold, and italic. The OOo predefined Table Heading paragraph style may be modified in the Styles and Formatting window, if desired.
  • Repeat heading — Repeats the heading row(s) of the table at the top of subsequent pages if the table spans more than one page.
    The first ... rows —Specifies the number of rows to be repeated. Default is 1.
  • Don’t split table — Prevents the table from spanning more than one page. This can be useful if the table starts near the end of a page, and would look better if it were completely located on the following page. If the table becomes longer than would fit on one page, you will need to either de-select this check box or manually split the table.
  • Border — Surrounds each cell of the table with a border. This border can be modified or deleted later.

The AutoFormat button opens a dialog from where it is possible to select one of the many predefined table layouts. See AutoFormatting tables for more information.

After making your choices, click OK. Writer creates a table as wide as the page margins, with all columns the same width and all rows the same height. You can then adjust the columns and rows later to suit your needs.

Tip: To directly insert a table with the default properties, click on the little arrow next to the Table icon on the Standard toolbar. A graphic appears where you can choose the table’s size (rows and columns). To create the table, click on the cell that you want to be on the last row of the last column. Holding down the mouse button over the Table icon will also display the graphic.

Creating nested tables

With OpenOffice.org 2.0 it became possible to create tables within tables, nested to a depth only limited by imagination and practicality. The figure below demonstrates a simple, 2 level example.

To achieve this, simply click in a cell of an existing table and use any of the methods mentioned in Inserting a new table.

Nested table
Nested table example. The shaded table is nested in a cell of the larger table.

Using AutoCorrect to create a table

You can also create a table by typing a series of hyphens (-) or tabs separated by plus signs. For example, type: +------+---+ and then press Enter. Plus signs indicate column dividers, while hyphens and tabs indicate the width of a column.

For example, this character sequence:

+-----------------+---------------+------+

creates a table like this:

AutoTable

Note: This function can be disabled or enabled in Tools > AutoCorrect. On the Options tab, deselect or select the Create table check box. This function does not operate when creating nested tables.

Caution: Always be careful when using tabs that you (a) know how wide they are set and (b) make sure that the tabs are set to the same values if used with other documents or by other users.

Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools