Working with Tables: How to use tables in OpenOffice.org Writer Title: Version: First edition: First English edition: Working with Tables: How to use tables in OpenOffice.org Writer 1.
Contents Overview..........................................................................................................................................ii Copyright and trademark information.........................................................................................ii Feedback..................................................................................................................................... ii Acknowledgments...................................................................
Overview Overview This document is intended for first-time users of OpenOffice.org. In it, you will learn how to insert and personalize a table in a document using OpenOffice.org Writer. You will find suggestions and examples of practical usage of tables in various document types. Copyright and trademark information The contents of this Documentation are subject to the Public Documentation License, Version 1.
Why use a table in a document Why use a table in a document With OpenOffice.
Why use a table in a document Figure 1. Dialog box to create a table In this dialog box, the number of rows and columns for the new table can be specified. The checkboxes in the Options area are used for the initial setup of the following table characteristics: • Header – This checkbox defines the first row of the table as a header. If this box is checked, the text is centered and the font is bold.
Why use a table in a document Figure 2. How to modify column width Object bar for tables In addition to the commands already presented, it is also possible to create and customize a table using the icons on the Object bar. When a table is created or an existing table is selected, the Object bar is automatically changed to display the icons affecting a table. Figure 3 illustrates the layout of the Object bar and gives a concise explanation of the function of each button. Figure 3.
Why use a table in a document • Fixed, proportional – Changes affect the entire table. However, the changes occur proportionally and the width of the table remains constant. For example, when you widen a cell, the adjacent cells become proportionally narrower, and in this scenario, a wider cell will shrink more than a narrower one. • Variable – Changes affect the table size. For example, when you widen a cell, the width of the table increases.
Formatting a table template: • The text font is the same as the Text Body style. • The paragraph alignment is Left, with an indentation of 0.64 cm before the text and 0 cm after. The first letter is capital. • When you write a long text in a cell, it wraps automatically to fit into the cell.
Formatting a table Figure 4. Initial set-up of the header Now a second header, with a different background, needs to be added at the top of the table to show the name of the factory. Adding a row 1) Select one cell in the header and right-click with mouse. Note: Do not click on the Add Row icon on the Object bar, because it adds a row below the selected one. 2) On the context menu select Row > Insert.
Formatting a table Figure 5. Adding a row before the header Merging cells and changing background The next steps are to merge the three cells of the first row into a single cell, change the background color, and add the text. 1) Select the three cells in the first row. 2) Right-click and select Cell > Merge on the context menu. 3) Right-click in the first row, now a single cell, and select Table. 4) In the window that appears (shown in Figure 6), select a color for the cell background.
Formatting a table Figure 6. Select the background In Figure 6, the selected color is a light green, and applies to that cell only. To make the text in the header row larger: 1) Select the first cell and right-click. 2) From the context menu select Size > 18. 3) Type the text, T-Company. The resulting header is illustrated in Figure 7. Figure 7.
Formatting a table Adding a logo to the table header To insert a company logo, in the header: 1) Select the top header cell. 2) Select Insert > Graphics > From File and select the graphic file. 3) While the inserted graphic is selected, right-click and select Wrap > Page Wrap from the context menu. 4) Drag the image to the rightmost side of the cell. Note: Be careful not to drag the image outside of the header cell. If you do, it won't be separated from the rest of the cells.
Formatting a table Figure 9. Find the path for the background file Filling and customizing the cells When the header is finished, it is time to fill the cells with content. The initial filling result is shown in Figure 10. Figure 10.
Formatting a table By default, text entered into table cells is aligned horizontally to the left and numbers are aligned to the right. In addition, if more than one row of text is entered, or a graphic is used, as in Figure 10, text aligns vertically to the top of the cell and numbers to the bottom. As in the header, graphics are inserted with no wrap. It is wise to change the wrap style to Page Wrap, so that they can be positioned where you want in the cell.
Formatting a table Figure 12. Number Format dialog box The resulting table is shown in Figure 13 Figure 13. Resulting table The result obtained so far seems satisfactory. However, a column for the product code that is to be used for posting the orders needs to be inserted.
Formatting a table Adding columns To add a new column before the first one: 1) Select one or more cells in the first column. 2) Right click and select Column > Insert. Note: Do not click on the Add Column icon in the Object bar because it adds a column after the selected one. 3) In the dialog box that appears, specify the number and position of the columns to add, as in Figure 14. Figure 14. Insert Column dialog box The unexpected result of this operation is shown in Figure 15. Figure 15.
Formatting a table Splitting and merging tables To resolve the issue, the following three things need to happen: 1) Split the table into two parts just below the first row. 2) Add a column to the lower part. 3) Merge the tables again. To split the previous table just below the first row (refer to Figure 16): 1) Select a cell in the second row. 2) Right-click and select Split Table in the context menu. 3) A dialog will pop up regarding the header. Select no header.
Formatting a table To merge the two tables again (refer to Figure 18): 1) Delete the blank paragraph between the tables. 2) Select a cell in the second table. 3) Right-click and select Merge Tables in the context menu. Figure 18. Merge the tables Sorting data in the table Sometimes data contained in the cells may need to sorted according to certain criteria. Figure 19 shows a table of names, ages and countries. Figure 19.
Sorting data in the table 3) In the Sort window, select the following as Sort criteria: Key 1 – Column 1 – Ascending Key 2 – Column 2 – Ascending Key 3 – Column 3 – Ascending 4) Click the OK button. Figure 20. Selection of Sort criteria Note: If you select just the cells of the first column in the example, the sort affects the first column only, while the others remain unchanged. In such a case, you risk mixing the data of the rows. Figure 21 shows the result of the Sort operation: Figure 21.
Deleting, copying, or moving a table Deleting, copying, or moving a table Deleting a table There are two ways to delete a table from a document. First method: 1) Click in the table. 2) Press Control+A to select all the cells. 3) Select Format > Row > Delete in the Main menu. Second method: 1) Select from the end of the paragraph before the table to the start of the paragraph after the table. 2) Press the Delete or Backspace key.
Splitting cells Splitting cells You may often need to create asymmetric tables, where some cells need to be split into two or more parts either vertically or horizontally. In this case, you may start creating a normal table, and then use the split cells function to subdivide the desired cells. To create the asymmetric table illustrated in Figure 22, perform the following steps: 1) Create a simple table with one header and one content row, and adjust the column widths as shown in Step 1 in the figure.
Using invisible tables Using invisible tables Sometimes it might be useful to use asymmetric invisible tables just to position several text fields in a document instead of using Tab or Spaces. The term invisible, in this case, means that the table exists, but its borders are not displayed or printed. Suppose that a business wants to prepare a letterhead to use for commercial mail.
Using invisible tables Figure 24. Table with transparent borders that will not be printed When the table is ready, the borders can be made invisible using one of these two methods: • Click on the Borders icon in the Object bar (refer to Figure 3), and click on the icon showing a light gray square. • Select Format > Table in the Main Menu, select the Borders tab and select set no borders, as shown in Figure 24. You will see that the table borders change from their color to a light gray.
Using mathematical functions in a table Using mathematical functions in a table In a table in a Writer document, it is possible to use some of the mathematical functions which are normally implemented by the OpenOffice.org Calc application. This facility is useful when you need to write an invoice or a bill. Figure 24 shows an example of an invoice containing a table where all the numeric values of the last column have been computed using some simple math functions. Figure 25.
Using mathematical functions in a table Figure 26. Cell identifiers To fill the table: 1) Write the headings in each column. 2) Write the descriptions of the articles, their quantity and unitary prices. 3) Write Total Amount in cell , VAT 12% in cell and TOTAL in cell . Then it is necessary to perform the following arithmetic operations: 1) Multiply the Quantity by Price for each product and put the result in the Amount column. a) Select cell and type =.
Using mathematical functions in a table Figure 27. Writing a formula in cell 2) Sum the contents of the cells in the Amount column and put the result in cell . (See Figure 28.) a) Select cell . b) Click on the Sum icon “∑” in the Object bar. The Object bar changes and displays the Sum function: sum(|!!). Press the Enter key. Figure 28.
Using mathematical functions in a table Figure 29. Compute the VAT amount 4) Sum the Total Amount to VAT amount and put the result in cell . (See Figure 30.) a) Select the cell and type =. b) Click on cell . c) Type + (to add). d) Click on cell . e) Press the Enter key. 5) Select all the cells in the last column and set the Number Format as Currency (US Dollars). Figure 30.
Using mathematical functions in a table To display the list of the mathematical functions that you can use in a table: 1) Select a blank cell and type = to display the Object bar for the formula 2) Click on the Formula icon as shown in Figure 31. Figure 31.