Working With Tables in Writer

From Apache OpenOffice Wiki
Jump to: navigation, search

Editing.png {{#switch:EN | RU = Статья в работе (ЧЕРНОВИК), и находится в процессе написания. | UA = Стаття в роботі (ЧЕРНЕТКА), і знаходиться в процесі написання. | EN = This page is in a DRAFT stage. | PT = Esta página está em um estágio de esboço. | DE = Der Artikel befindet sich im Aufbau (ENTWURF) und wird gerade geschrieben. | #default = Статья в работе (ЧЕРНОВИК), и находится в процессе написания. }}

{{#if: | |}}

{{#vardefine:v1|0}}

{{#if:

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../preload}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../preload1}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../preload2}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../preload3}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../preload4}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../preload5}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../preload6}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../preload7}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../Template:NeedsRework}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexist:{{#rel2abs: ../../rules/templates}}

 | {{#vardefine:v1|{{#expr:{{#var:v1}}+1}}}}
 |

}}{{#ifexpr:{{#expr:{{#var:v1}}>0}}

 |
 |

}}

Edit-find-replace.png {{#switch:EN | RU = Эта статья должна быть проверена на точность и соответствие стилю. | UA = Ця стаття повинна бути перевірена на точність і відповідність стилю. | EN = This article should be checked for accuracy and conformity to style. | PT = Este artigo deve ser verificado quanto à precisão e conformidade ao estilo. | #default = Эта статья должна быть проверена на точность и соответствие стилю. (This article should be checked for accuracy and conformity to style) }}


Creating and Customizing Tables

Documentation note.png At the beginning of a document or a section in order to introduce content before the table it is necessary to go to the first cell (top left) and press  {{#switch:enter shift = ⇧ Shift up = ↑ down = ↓ > = → < = ← enter = ↵ Enter cmd = ⌘ Cmd command = ⌘ Cmd opt = ⌥ Opt option = ⌥ Opt tab = Tab ⇆ backspace = ← Backspace << = ← Backspace bs = ← Backspace * = * # = # ; = ; : = : #default = Enter

}} {{#if:| +  {{#switch:{{{2}}}

shift = ⇧ Shift up = ↑ down = ↓ > = → < = ← enter = ↵ Enter cmd = ⌘ Cmd command = ⌘ Cmd opt = ⌥ Opt option = ⌥ Opt tab = Tab ⇆ backspace = ← Backspace << = ← Backspace bs = ← Backspace * = * # = # ; = ; : = : #default = {{{2}}}

}} }}{{#if:| +  {{#switch:{{{3}}}

shift = ⇧ Shift up = ↑ down = ↓ > = → < = ← enter = ↵ Enter cmd = ⌘ Cmd command = ⌘ Cmd opt = ⌥ Opt option = ⌥ Opt tab = Tab ⇆ backspace = ← Backspace << = ← Backspace bs = ← Backspace * = * # = # ; = ; : = : #default = {{{3}}}

}} }}{{#if:| +  {{#switch:{{{4}}}

shift = ⇧ Shift up = ↑ down = ↓ > = → < = ← enter = ↵ Enter cmd = ⌘ Cmd command = ⌘ Cmd opt = ⌥ Opt option = ⌥ Opt tab = Tab ⇆ backspace = ← Backspace << = ← Backspace bs = ← Backspace * = * # = # ; = ; : = : #default = {{{4}}}

}} }}{{#if:| +  {{#switch:{{{5}}}

shift = ⇧ Shift up = ↑ down = ↓ > = → < = ← enter = ↵ Enter cmd = ⌘ Cmd command = ⌘ Cmd opt = ⌥ Opt option = ⌥ Opt tab = Tab ⇆ backspace = ← Backspace << = ← Backspace bs = ← Backspace * = * # = # ; = ; : = : #default = {{{5}}}

}} }}{{#if:| +  {{#switch:{{{6}}}

shift = ⇧ Shift up = ↑ down = ↓ > = → < = ← enter = ↵ Enter cmd = ⌘ Cmd command = ⌘ Cmd opt = ⌥ Opt option = ⌥ Opt tab = Tab ⇆ backspace = ← Backspace << = ← Backspace bs = ← Backspace * = * # = # ; = ; : = : #default = {{{6}}}

}} }}

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

The first is to use the corresponding button on the "Standard" toolbar, as shown in the following screenshot:


ES-InsertarTabla.png


On the grid it is possible to select the number of rows and columns needed.

The other way to insert a table gives greater control: {{#if: Table |Table}}{{#if: Insert | → Insert}}{{#if: Table | → Table}}{{#if: | → {{{4}}}}}{{#if: | → {{{5}}}}}{{#if: | → {{{6}}}}}{{#if: | → {{{7}}}}}{{#if: | → {{{8}}}}}{{#if: | → {{{9}}}}}{{#if: | → {{{10}}}}} or  {{#switch:ctrl | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = Ctrl }} {{#if:F12| +  {{#switch:f12 | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = F12 }} }}{{#if:| +  {{#switch:{{{3}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{3}}} }} }}{{#if:| +  {{#switch:{{{4}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{4}}} }} }}{{#if:| +  {{#switch:{{{5}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{5}}} }} }}{{#if:| +  {{#switch:{{{6}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{6}}} }} }}


AOO-InsertTableMenu.png


In this dialogue it is possible to:

  • select the number of rows and columns;
  • give a name to the table to later distinguish it on the Navigator.


The  AutoFormat  offers the following dialogue:


AOO-TableAutoFormat.png


Here it is possible to choose between different predefined formats (different line types, cell colors, text format...).

If none of the predefined autoformats have the desired characteristics, it is possible to tune the format of the table or of a particular cell. This is accomplished either with the contextual toolbar "Table" that it is presented when the cursor is inside a table cell or with {{#if: Table |Table}}{{#if: Table Properties | → Table Properties}}{{#if: | → {{{3}}}}}{{#if: | → {{{4}}}}}{{#if: | → {{{5}}}}}{{#if: | → {{{6}}}}}{{#if: | → {{{7}}}}}{{#if: | → {{{8}}}}}{{#if: | → {{{9}}}}}{{#if: | → {{{10}}}}} or with a right click Table. After that, it is possible to create your own AutoFormat: with the cursor inside the table {{#if: Table |Table}}{{#if: AutoFormat | → AutoFormat}}{{#if: | → {{{3}}}}}{{#if: | → {{{4}}}}}{{#if: | → {{{5}}}}}{{#if: | → {{{6}}}}}{{#if: | → {{{7}}}}}{{#if: | → {{{8}}}}}{{#if: | → {{{9}}}}}{{#if: | → {{{10}}}}} and then press  Add  and provide a name to the new AutoFormat.

It is possible to assign a caption to a table, numbering it at the same time, with a right click → Caption.


AOO-TableCaption.png


As shown in the screenshot it is possible to choose the numbering, the separator between number and text, and if the caption will be shown above or below the table.

With the  AutoCaption  button it is possible to set that all the inserted tables are automatically associated to a caption, while the  Options  gives the chance to define if the table number needs to reflect the chapter number, also. We will come back to this later.

It is important to note that 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

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 {{#if: Tools |Tools}}{{#if: Options | → Options}}{{#if: Language Settings | → Language Settings}}{{#if: Languages | → Languages}}{{#if: Locale setting | → Locale setting}}{{#if: | → {{{6}}}}}{{#if: | → {{{7}}}}}{{#if: | → {{{8}}}}}{{#if: | → {{{9}}}}}{{#if: | → {{{10}}}}}). To disable this, go to {{#if: Tools |Tools}}{{#if: Options | → Options}}{{#if: OpenOffice Writer | → OpenOffice Writer}}{{#if: Table | → Table}}{{#if: | → {{{5}}}}}{{#if: | → {{{6}}}}}{{#if: | → {{{7}}}}}{{#if: | → {{{8}}}}}{{#if: | → {{{9}}}}}{{#if: | → {{{10}}}}} 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 ( {{#switch:f2 | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = F2 }} {{#if:| +  {{#switch:{{{2}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{2}}} }} }}{{#if:| +  {{#switch:{{{3}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{3}}} }} }}{{#if:| +  {{#switch:{{{4}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{4}}} }} }}{{#if:| +  {{#switch:{{{5}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{5}}} }} }}{{#if:| +  {{#switch:{{{6}}} | shift = ⇧ Shift | up = ↑ | down = ↓ | > = → | < = ← | enter = ↵ Enter | cmd = ⌘ Cmd | command = ⌘ Cmd | opt = ⌥ Opt | option = ⌥ Opt | tab = Tab ⇆ | backspace = ← Backspace | << = ← Backspace | bs = ← Backspace | * = * | # = # | ; = ; | : = : | #default = {{{6}}} }} }}) and how to use it

Personal tools