Création d'un tableau
- Création d'un tableau
- Formatage de la mise en page du tableau
- Redimensionnement et positionnement du tableau
- Redimensionnement, positionnement et insertion de lignes et de colonnes
- Fusion et scission de cellules
- Bordures, arrière-plan et limites du tableau
- Formatage du texte du tableau
- Formatage de la mise en page du tableau
- Saisie et manipulation de données dans les tableaux
- Opérations supplémentaires dans les tableaux
- Menu et barre d'outils dans les tableaux
Avant d'insérer un tableau dans un document, cela aide d'avoir une idée du résultat que vous souhaitez obtenir et d'estimer le nombre de lignes et de colonnes nécessaires. Chaque paramètre peut être modifié à une étape ultérieure ; cependant, prévoir peut économiser pas mal de temps dans la mesure où des modifications faites sur un tableau déjà formaté peut demander des efforts significatifs.
Insérer un nouveau tableau
Pour insérer un nouveau tableau, positionnez le curseur là où vous souhaitez que le tableau apparaisse, puis utilisez l'une des méthodes suivantes pour ouvrir la boîte de dialogue Insérer un tableau :
- À partir du menu principal, sélectionnez Tableau > Insérer > Tableau.
- Appuyez sur Ctrl+F12.
- À partir de la barre d'outils Standard, cliquez sur l'icône Tableau
Ici, vous pouvez spécifier les propriétés du nouveau tableau.
Sous Nom, vous pouvez saisir un nom différent que celui généré par défaut par Apache OpenOffice. Les noms sont très pratiques lors de l'utilisation du Navigateur, afin de sauter directement à un tableau.
Sous Taille, spécifiez le nombre initial de colonnes et de lignes pour le nouveau tableau. Vous pourrez modifier la taille du tableau plus tard si nécessaire.
Sous Options, définissez les caractéristiques initiales du tableau. Sélectionner les options dans cette section de la boîte de dialogue produit les résultats suivants :
- 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. You can edit the OOo-predefined Table Heading paragraph style in the Styles and Formatting window to change these default settings. When splitting a table into two tables, the Heading row(s) are copied in the second table.
- 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 deselect this option 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 Automatic formatting of tables for more information.
After making your choices, click OK. Writer creates a table as wide as the text area (from the left page margin to the right page margin), 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.
Creating nested tables
You can create tables within tables, nested to a depth only limited by imagination and practicality. The figure below demonstrates a simple, two-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 above.
Using AutoCorrect to create a table
You can also create a table by typing a series of hyphens (-) or tabs separated by plus signs. Use the plus signs to indicate column dividers, while hyphens and tabs are used to indicate the width of a column.
For example, this character sequence:
+-----------------+---------------+------+
creates a table like this:
Create a table from formatted text
It is possible to create a table starting from plain text by means of the Table > Convert > Text to Table menu. In order for this command to work effectively, the starting text needs to have clear demarcation between what will become the columns of the table. Paragraph marks indicate the end of a row.
To convert text to a table, start by selecting the text you want to convert and select Table > Convert > Text to Table to open the dialog box shown below.
In the top part of the dialog box, select the symbol that separates the columns. This would normally be a tab, but it could be a semicolon or comma if you are importing a CSV file. The other options in this dialog are the same as those in the dialog used to insert a table shown in Figure 1.
Example
In this example we will convert the following text into a table.
Row 1 Column 1; Row 1 Column 2; Row 1 Column 3
Row 2 Column 1; Row 2 Column 2; Row 2 Column 3
In this case, the separator between elements is a semicolon. By selecting the text and applying the conversion, we obtain the following result.
Row 1 Column 1 | Row 1 Column 2 | Row 1 Column 3 |
Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
Note that, unlike when creating a table with other mechanisms, the conversion from text to table preserves the paragraph style applied to the original text.
You can also use the Convert menu to perform the opposite operation; that is, to transform a table into plain text. This may be useful when you want to export the table contents into a different program.
To transform a table into text, place the cursor anywhere in the table, select Table > Convert > Table to Text in the main menu, pick the preferred row separator, and click OK to finish.
Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY). |