Formatting
Tables
Presenting
content in tables is a normal part of writing for any purpose. If you've worked
in MS Word, you know that adding a table to a document is relatively simple.
The same is true for Confluence but, there are some things you may need to
know.
If you already
have a table that you've created in another application, outside of Confluence,
you can copy and paste it into Confluence. The same is true for tables
you wish to add from a website–copy and paste. However, the end result may not
be exactly what you either A). wanted or, B). anticipated. Here, we'll attempt
to explain why this might be.
The first thing
to bear in mind is that Confluence is a "web processor". You've
heard of "word processors"–MS Word being the one most commonly
encountered in business. Confluence is bound by a different set of rules which
is why there can be differences in terms of procedures and outcomes when
working with it. So, it's useful to see how best to work with tables in
Confluence.
When you have a
page you're either creating or, editing, you can find the 'Insert Table' icon
on the Editing toolbar:

Clicking the
Insert Table icon on the Editing toolbar results in this:

You get a
drop-down menu–not unlike what you find in MS Word--with a series of rows and
columns that allows you to quickly sweep your mouse to the amount of both rows
and columns you'll need. For references sake, it's worth noting that the
maximum table size you can create with this method is 15 X 20. That's 15
columns and 20 rows.

Above, you'll
see that the Insert Table dialog box allows you to determine the amount of rows
and columns your table will need. Also, there's a checkbox that sets aside a
row at the top for headings in your table–something that is almost universal
when assembling a table. Mind you, the heading row is counted with the total
amount of rows so, if you have four rows of table content and one row of
headings, the number of rows would have to change to 5. Unless you have a
reason for not needing it, you can leave the checkbox checked. Were I to insert
this table into my document, this is how it would look:

You'll note that
the first row is slightly shaded. This helps to draw attention to the column
headings so that your audience will be better able to put the table data into
its proper context. Also, using this method, you can create a table with a lot
more rows and columns than you can using the 'mouse-sweep' process, shown
above.
Once you have a
table on your page, you can either start typing in the content for the cells
or, you can copy and paste it in from another source.
Company
|
Contact
|
Country
|
Alfreds
Futterkiste
|
Maria
Anders
|
Germany
|
Centro
comercial Moctezuma
|
Francisco
Chang
|
Mexico
|
Ernst
Handel
|
Roland
Mendel
|
Austria
|
Island
Trading
|
Helen
Bennett
|
UK
|
Laughing
Bacchus Winecellars
|
Yoshi
Tannamuri
|
Canada
|
Magazzini
Alimentari Riuniti
|
Giovanni
Rovelli
|
Italy
|
Here, I've gone
to a website and just grabbed some example text that was formatted into a table
on that page. It's interesting to note that this table has three columns and
seven rows (including the heading row). What I called up–using the mouse-sweep
method–was a 2 X 5 table. So, you should be compelled to wonder how it is that
I got a table that fit my copied and pasted content. Here's why:

This is the
Table Tools toolbar. It appears in the Confluence creation space the moment you
create a table. By default, it's set to 'Responsive'–which means that
Confluence will automatically add rows and/or columns to fit the content you
are pasting in. All you have to do is click the upper-leftmost cell within the
table and paste in the text. Note that if you select a cell other than the
upper leftmost as your 'target' cell, the pasted content will go in, starting
from that cell–which will likely throw everything off. The good news is that
you can choose Undo from the toolbar or, CTRL-Z from the keyboard, to remove
the improperly-placed text and start again by selecting the upper-leftmost cell
and pasting there.
Aside from
'Responsive', the other choice you have is 'Fixed Width':

Fixed width
means that the cells in the table have a set width and anything you paste or
type into them will have to fit. This option can lead to some very unexpected
and, typically, unwanted outcomes. So, you'll probably leave the option of
'Responsive' where it is.
Let's go back to
the table I added a few minutes ago:
Company
|
Contact
|
Country
|
Alfreds
Futterkiste
|
Maria
Anders
|
Germany
|
Centro
comercial Moctezuma
|
Francisco
Chang
|
Mexico
|
Ernst
Handel
|
Roland
Mendel
|
Austria
|
Island
Trading
|
Helen
Bennett
|
UK
|
Laughing
Bacchus Winecellars
|
Yoshi
Tannamuri
|
Canada
|
Magazzini
Alimentari Riuniti
|
Giovanni
Rovelli
|
Italy
|
You'll notice
that all of the table content is left-justified. If I wished to change this, I
can highlight the cell, or cells, I wish to change and use the appropriate
alignment buttons on the Formatting toolbar.

Here, I've
centered the headings by highlighting them with my left mouse cursor and using
the center-alignment button.
Company
|
Contact
|
Country
|
Alfreds
Futterkiste
|
Maria
Anders
|
Germany
|
Centro
comercial Moctezuma
|
Francisco
Chang
|
Mexico
|
Ernst
Handel
|
Roland
Mendel
|
Austria
|
Island
Trading
|
Helen
Bennett
|
UK
|
Laughing
Bacchus Winecellars
|
Yoshi
Tannamuri
|
Canada
|
Magazzini
Alimentari Riuniti
|
Giovanni
Rovelli
|
Italy
|
The same can be
done with any or, all, of the text in the various cells.
Something else
you'll notice is that tables justify to the left of the page when they're
inserted in Confluence. The same is also true for images or graphics. How do
you center them on the page?
The answer to
this involves a little bit of finesse. Here, at the ITS Research Lair,
dedicated scientists wearing freshly laundered lab coats have determined that
the 'friendliest' way to do this is to place your mouse cursor immediately to
the left of the table, or image, and use the Indent button on the Formatting
toolbar to move the item to the right.


If this seems a
bit like using 'Kentucky Windage' to place items on the page, you are correct!
If you miss, by placing an item too far to the right, you can use the Outdent
button to move it back toward the left.
The Table
Toolbar:

After the
choices for Responsive/Fixed Width is the 'Insert Row Above' button. With this
button, all you have to do is select a row in your table by clicking in any of
the cells within that row, then left-click the icon and a blank row will be
added above. You can also do this by using the Alt + Up Arrow key combination
on your keyboard.
The 'Insert Row
Below' button will add a new row below your cursor.

The 'Remove
Current Row' button will remove any row from a table into which you have set
focus by clicking a cell.

Cutting,
Copying and Pasting Rows are the button commands for cut, copy and Paste. You
can also copy a row by using CTRL + Shift + c on the keyboard. Cutting is CTRL
+ Shift + x. Pasting the content of a row that you have either copied or cut is
done by using CTRL + Shift + v.

Cutting, Copying
and Pasting Columns are the button command options for columns for cut, copy
and paster. Unfortunately, there aren't any keyboard shortcuts for working with
these.

These buttons
all for adding a column to the left, to the right and removing a column. Each
of these works the same as the controls for rows: left click any cell within a
column you wish to either add a column to the left or right of or, delete from
a table.

These are the
options for merging or splitting cells that have been merged. Select all the
cells you would like to merge and select the appropriate option.

There are two:
one is for columnar headings (the leftmost of the two) and the other is for row
headings. Click into the row or column that you wish to add headings above or
next to and select the necessary icon.

Moving one
further to the right, you will encounter the 'Change Cell Color' button. This
enables you to select a cell, or range of cells, within a table and alter the
background color. You can also remove color from a cell or, range of cells, by
clicking on the down-arrow to the right of the button.
This is a
'Remove Table' button. This button will remove your table. Click anywhere in
the table and select this icon to remove the table for the page.

This is the
'Table Settings' icon. The lone option this provides is to insert a numbered
column in your table. One uses this by clicking a cell anywhere in your table
then, left-clicking the icon will drop down an option to check a box wherein
you will then place said numbered column as the leftmost in the table.