Resizing, positioning, and inserting rows and columns

From Apache OpenOffice Wiki
Jump to: navigation, search

Resizing rows and columns

You can adjust the height of rows and the width of columns in a table in several ways.

  • Move the mouse next to the edge of the cell and when a double-headed arrow appears, click and hold the left mouse button, drag the border to the desired position, and release the mouse button.
  • On the horizontal ruler, column dividers are marked by a pair of thin gray lines; the vertical ruler indicates row dividers in the same way. You can resize a row or column by holding the mouse button down on the appropriate divider and dragging it to the desired location.
  • Use the keyboard as described below.

Selecting Table > Autofit from the main menu also offers some resizing options:

  • The Optimal Column Width or Optimal Row Height options make the columns or rows as narrow as possible while still fitting their contents.
  • Columns and rows can be distributed evenly to quickly bring them back to all being the same width or height.

For greater control over the width of each column, use the Columns page of the Table Format dialog box.

Table Format dialog box: Columns page

Right-click on the table and select Table from the pop-up menu or select Table > Table Properties from the menu bar. On the Table Format dialog box, select the Columns tab.

  • Adapt table width: If a table already stretches to the page margins, it cannot stretch any wider and the Adapt table width option is not available. If the table is narrower, increasing the width of a column will increase the width of the whole table. If the table width already extends pasts the margins with the Adapt table width option checked, attempting to change a column width will automatically decrease that column’s size so that the table will now shrink to the page margins while keeping any other column sizes intact.
  • Adjust columns proportionally results in all columns changing their widths by the same percentage when one is changed. For example, if you reduce by half the size of a column, all the other columns sizes will be halved.
  • Remaining space shows how much further the table can expand before hitting the limit of the margins. This value cannot be edited and will not be negative in the event that the table width is already larger than the space between the left and right margins.
  • Under Column width, each individual column can be adjusted. If you have more than six columns, use the arrows at the right and left to view them all.

Rather than start from the Table Format dialog box, it is often more efficient to make rough adjustments to a new table using the mouse, and then fine tune the layout using the Columns page in conjunction with the Table page of the Table Format dialog box.

It is also possible to resize a table using only the keyboard. This is on occasions easier than using the mouse.

  1. Place the cursor on the cell whose size you want to change.
  2. Press and hold the Alt key while using the arrow keys to change the size.

To adjust the resizing parameters and behavior for keyboard handling, select Tools > Options > Writer > Table.

Use the Row and Column values in the Move cells section to determine the amount of change produced by a single keystroke while resizing. In the Behavior of rows/columns section you can choose one of the following three strategies when resizing:

  • Fixed: select this if you want the resizing to only affect the adjacent cell, and not the entire table. The width of the table does not change when resizing its cells.
  • Fixed, proportional: when resizing a cell with this option selected, all the other cells are also resized proportionally, Also in this case the width of the table remains constant.
  • Variable: this is the default value. Resizing a cell affects the table size. For example, when you widen a cell, the width of the table increases.

Inserting rows and columns

To insert any number of rows or columns:

  1. Place the cursor in the row or column where you want to add new rows or columns and right-click.
  2. On the pop-up menu, select Row > Insert or Column > Insert. This will display a dialog box where you can select the number of rows or columns to add, and whether they appear before or after the selected one.
  3. Set Amount to the number of rows or columns to insert, and Position to Before or After.
  4. Click OK to close the dialog box.
Documentation note.png Clicking on the Insert Row icon on the Table toolbar inserts one row below the selected one. Clicking on the Insert Column icon on the Table toolbar inserts a column after (to the right of) the selected one.

Regardless of how they are inserted, new rows or columns have the same formatting as the row or column where the cursor was when the insert command was issued.

You can also quickly insert a row or a column using only the keyboard:

  1. Place the cursor in the row or column next to the row or column you want to insert.
  2. Use the Alt+Insert keystroke combination to activate keyboard handling.
  3. Use the arrow keys as desired to add a row or column:
  • Left to insert a new column to the left of the cell where the cursor is located.
  • Right to insert a new column to the right of the cell where the cursor is.
  • Down to insert a new row below the cell where the cursor is.
  • Up to insert a new row above the cell where the cursor is.

The above keyboard technique can also be used to delete rows or columns by substituting the Alt+Insert keystroke combination in Step 2 with Alt+Delete.

Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools