Difference between revisions of "Documentation/UserGuide/Writer/Tables"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Captioning a table)
m (Formatting a table)
Line 67: Line 67:
  
 
= Formatting a table =
 
= Formatting a table =
 +
 +
Formatting a table involves the formatting of the table layout, and the formatting of the table text. Formatting the layout involves adjusting the size of the table, its position on the page, adding or removing rows or columns, merging and splitting cells, changing borders and the background.
  
 
== Inserting rows and columns ==
 
== Inserting rows and columns ==
Line 105: Line 107:
  
 
{{Documentation/Note|Note: If '''Merge adjacent line styles''' is selected, two cells sharing a common border will have their borders merged, rather than be side by side.}}
 
{{Documentation/Note|Note: If '''Merge adjacent line styles''' is selected, two cells sharing a common border will have their borders merged, rather than be side by side.}}
 
  
 
= Number Recognition and Data Operations =
 
= Number Recognition and Data Operations =

Revision as of 17:03, 17 October 2013

Template:Documentation/DraftPage


Creating and Customizing Tables

Template:Documentation/Note

There are two ways to insert a table in a Writer document:

  • Click on the Table Writer-table-icon.jpg icon in the Standard toolbar
  • Create a table through the Insert Table dialog box

Using the Table icon

To insert a table quickly from the standard tool bar:

  1. Place the cursor where you want the table to appear.
  2. Click the arrow to the right side of the Table Writer-table-icon.jpg icon.
  3. In the drop down grid, select the number of rows and columns for the table.
  4. The table will appear at the location of your cursor.


ES-InsertarTabla.png

Using the Insert Table dialog box

To insert a table with more control over the settings and properties, use the Insert Table dialog box.To open the dialog box, select Table → Insert → Table or  Ctrl  +  F12  or left click the Table icon. From this dialog box you can:

  • Select the number of rows and columns of the table
  • Give a name to the table to later distinguish it in the Navigator
  • Select the Heading option to define the first row in the table as the heading
  • Select the Repeat heading option to repeat the heading row if the table spans more than one page
  • Select the Don't split table option to prevent the table from spanning more than one page
  • Select the Border option to surround each cell of the table with a border


AOO-InsertTableMenu.png


The  AutoFormat  button at the bottom of the dialog box opens the AutoFormat dialog box:


AOO-TableAutoFormat.png


From here it is possible to choose between different predefined formats.

If none of the predefined autoformats have the desired characteristics for your table, you can tune the format of the table or of a particular cell with the contextual Table toolbar. Open the toolbar by placing the cursor inside a table cell or select View → Toolbars → Table. If you wish to save the formatting you just created, place your cursor inside the table, and select Table → AutoFormat and then press  Add . Provide a name for the new AutoFormat so you can find it later.

Creating nested tables

You can create tables within tables. To achieve this, click in a cell of an existing table, and follow any method as described above to insert another table.

Writer-nested-table.jpg

Captioning a table

It is possible to assign a caption (with numbering) to a table. Simply place the cursor inside the table, right click, and choose Caption.


AOO-TableCaption.png


As shown in the screenshot you can choose the numbering, the separator between number and text, and the position of the caption. The drop down menu "Category" can be edited. For example, if you want "Data" instead of "Table", you can click over the white box where the word "Table" is, and edit the text in the box to create another category.

By choosing the  AutoCaption  button you can set that all the inserted tables are automatically associated to a caption, while the  Options  button gives you the chance to define if the table number needs to reflect the chapter number.

Formatting a table

Formatting a table involves the formatting of the table layout, and the formatting of the table text. Formatting the layout involves adjusting the size of the table, its position on the page, adding or removing rows or columns, merging and splitting cells, changing borders and the background.

Inserting rows and columns

To insert rows or columns inside a table:

  1. Place the cursor in the row or column where you will add new rows or columns and right click.
  2. Choose Row → Insert or Column → Insert. A dialog box will appear, from which you can select the number of rows or columns to insert. You can also set the position of the new rows or columns to Before or After.
  3. Click OK to close the dialog box.


Writer-Tables-Insert-Rows.jpg

Merging and splitting cells

To merge a group of cells:

  1. Place the cursor inside the cell.
  2. Right click and choose Cell → Split, or choose Table → Split Cells from the menu bar.
  3. Select the direction of the split, horizontally (more rows), or vertically (more columns), as well as the total number of cells to create.


Writer-Tables-Split-cells.jpg

Table borders

Within the Table Format dialog box (from the menu bar select Table → Table Properties), you can set the borders for a table or a group of cells and adjust the properties of the borders.


Writer-Tables-Table-Format.jpg

The properties of a border are as follows:

  • Line arrangement specifies where the borders go. Writer provides five default arrangements, but you can modify the defaults or create your arrangement by clicking on the line you want to customize in the User-defined area. Clicking on a line area once creates a border and clicking twice creates a bold weight border. Clicking on an intersection modifies multiple borders simultaneously.
  • Line specifies what the border will look like in style and color. You can select from a number of different styles and colors. The style and color will be shown on the User-defined area under Line arrangement if any borders are selected.
  • Spacing to contents specifies how much space to leave between the border and cell contents. Choose Synchronize to have the same spacing for all four sides. The spacing functions like padding and is factored when calculating text measurements.
  • Shadow style applies to the whole table. You can choose from five default positions, how far from the table the shadow is cast, and the color of the shadow.

Template:Documentation/Note

Number Recognition and Data Operations

By default, Writer tries to guess which kind of data you insert on a table and format the content accordingly. For example, if you insert "10/2" Writer will interpret it as a date and change it into "10/02/13" (the result may depend on your settings under Tools → Options → Language Settings → Languages → Locale setting). To disable this, go to Tools → Options → OpenOffice Writer → Table and under "Input in tables" disable "Number recognition".

With tables on Writer it is possible to operate with data introduced on cells, for example obtaining the sum over a column.

Documentation caution.png The operation you can do on a table on Writer are limited. If you need to perform complex calculations you need to use Calc instead. Remember that you can insert a Calc sheet on a Writer document as OLE object

TODO: talking about the Formula toolbar ( F2 ) and how to use it

Personal tools