Occasionally a document will feature some kind of data that would be most appropriately presented in a table—sales figures, projected growth, and so on—and Writer has a useful selection of table-editing tools that can do quite a lot before you have to migrate to the Calc spreadsheet. Tables are covered in more detail later—skip ahead if you have an insatiable desire or pressing need to organize tabulated data—but for now, let’s look at the three most common ways of inserting a table into a document. Method one is essentially the same as inserting a frame or image, except we choose Table --> Insert to launch the configuration dialog box (see Figure 3-18). In this dialog box, you can define the number of column (horizontal) and row (vertical) elements in the table and insert a header for the table that can contain labels for the columns. If the Header option is selected, a new button is enabled that will add an extra header section at the top of a page should the table span two pages. By default, the table takes up the entire width of the page, frame, or column into which it is inserted; the columns are equally spaced, and the rows expand to accommodate the information put into them. Selecting Don’t split table makes sure the entire production appears on a single page. The Border check box puts solid division lines between each cell.
If you’re feeling particularly pushed for time, a number of predesigned table styles are available via the AutoFormat button with good options to match most color schemes. The AutoFormat options are actually a good place to start if you want to go beyond simple white backgrounds and black lines. You can also create an AutoFormat based on a table design you’ve created. After a table has been formatted, choose Table --> AutoFormat and select the Add button. Provide a name for the creation, and it will be added to the list of available designs. This can be used to ensure that all tables in a single document or series are consistently formatted.
The second way to add a table is also the quickest. Select the drop- down arrow to the immediate right of the Table button on the standard toolbar, and drag the mouse to define the number of columns and rows needed (see Figure 3-19). Once clicked, a table with those dimensions will be inserted into the document at the cursor point and will range right across the available space.
Insert a table into a document with Table --> Insert, and then define the rows
and columns to be included
and columns to be included
Use the dedicated button on the Toolbar to quickly add a table to a document.
Use the visual representation to define the number of rows and columns.
Use the visual representation to define the number of rows and columns.
BASIC TABLE FORMATTING
Clicking anywhere in a table causes the Table editing toolbox (a floating toolbar that can be anchored to any part of the Writer window) to appear. We’ll look at most of the options in here later, but for now, we just want to add a hint of color to the header of the table so it’s obviously not part of the data. One important point to remember is that edits made in this toolbox will affect the cell, row, or column that the cursor is in. So to change the color of the header, you need to click into the leftmost column and drag across the rest of the header row. This selects just that row (you can also hover the mouse close to the far left or right border so it becomes an arrow and just click), and then you can add a background color by opening the chooser (the fifth icon on the top row) and picking a color. Each of the highlighted cells assumes that color.
The third and final method—the one you’ll use in this example—is especially good when the data is already present in a document. For example, you have a set of statistics that are arranged in the following manner: and so on. This is known as tab-delimited data because the tab key marks one element out from the next. Turning this kind of data into a table involves highlighting all of the parts with the mouse and choosing Table --> Convert --> Text to Table. This launches a dialog box with the same options as previously mentioned but with the addition of a section where you can set the delimiting character (see Figure 3-20). This has various options, such as Tabs, Paragraph (Enter key), Semicolons, and Other, where you can input any textual element as a delimiter, which means you can deal with just about any kind of data. In this case, selecting the Header element turns the first line of the data into column headers. AutoFormat is also available here.
Tab- delimited text can be added to a document as a table with the Table --> Convert --> Text to Table option.