Working with Tables

By the Syncfusion DevTutorials team · Last updated

Create tables, add and remove rows and columns, and make tables readable with styles, borders, and shading.

Some information is hard to read as sentences: timetables, price lists, contact details, comparisons. A table puts that information in neat rows and columns so readers can find what they need at a glance. In this lesson, you'll create tables, add and remove rows and columns, and make tables look good with styles, borders, and shading.

Open the Word sandbox and follow along.

Parts of a table

Before you create your first table, it helps to know the words for the parts. Here they are:

PartWhat it is
RowA line of boxes going across
ColumnA line of boxes going down
CellOne box, where a row and a column meet
Header rowThe first row, holding the labels for each column

Create tables

Now you know the parts, so let's build a table:

  1. Click where the table should go.
  2. On the Insert tab, click Table.
  3. Move the mouse over the grid to choose the size, such as 3 columns by 4 rows, and click. Or choose Insert Table and type the number of columns and rows.

The table appears with an empty cell under the cursor. Now type:

  • Tab moves to the next cell. In the last cell of the table, Tab adds a new row.
  • Shift + Tab moves back one cell.
  • The arrow keys move between cells too.
  • Enter adds a new line inside the same cell.

Plan the table before you insert it. Count your columns (the kinds of information) and add one row for the headings. You can always add more rows later, but getting the columns right first saves work.

Manage rows and columns

Tables rarely stay the same size. You'll often need to add rows for new items or remove columns you don't need. To change them, click in a cell, then right-click (or use the Layout tab that appears for tables):

To do thisChoose
Add a row above or belowInsert > Insert Rows Above / Insert Rows Below
Add a column left or rightInsert > Insert Columns Left / Insert Columns Right
Remove a row, column, or the whole tableDelete > Delete Rows / Delete Columns / Delete Table
Join cells into oneSelect the cells, then Merge Cells

To change a column's width, point at the border between two columns until the pointer becomes a double arrow, then drag it left or right.

Pressing Delete with cells selected only clears the text in them. The cells stay. To remove rows or columns completely, use Delete Rows or Delete Columns.

Table styles

Once the table has the right rows and columns, you can make it look good. A table style is a ready-made design: colors, borders, and fonts for the whole table in one click.

  1. Click anywhere in the table.
  2. Open the Table Design tab that appears when the cursor is in a table.
  3. Pick a style from the gallery.

Styles usually make the header row stand out and give alternate rows a light color (called banded rows), which makes long tables easier to follow. If you don't see a style gallery in the sandbox, use borders and shading instead; you'll get the same result by hand.

Borders

Table styles handle most formatting automatically, but sometimes you want more control. Borders are the lines around and between cells.

  1. Select the cells (or click in the table to change all of it).
  2. Open Borders and Shading from the right-click menu, or use the Borders button on the Table Design tab.
  3. Choose a setting, such as All for lines everywhere or Box for just an outside line, and pick a line style, color, and width.

To remove all lines, choose None. The grid still exists; you just don't see it when you print.

Shading

Shading fills cells with a background color. It's the classic way to make the header row stand out.

  1. Select the cells to color, such as the whole first row.
  2. Open Borders and Shading and go to the Shading tab, or use the Shading button on the Table Design tab.
  3. Pick a color and click OK.

Keep shading light so the text stays readable. A pale color behind black text works; a dark color needs white text. And make the header row look different from the rest, so readers know at a glance what each column means.

Common mistakes

Here are the most common traps, and how to fix them:

MistakeWhat happensHow to fix it
Pressing Enter to move to the next cellA new line appears inside the same cellPress Tab instead, and Backspace to remove the extra line
Pressing Delete to remove a rowThe text goes, but the empty row staysRight-click and choose Delete Rows
Building a "table" with spacesColumns don't line up, and they break when editedInsert a real table
Shading only part of the header rowThe heading looks unfinishedSelect the whole row before shading
Making the table wider than the pageThe right side is cut off when printedDrag the column borders in, or use AutoFit

Exercise

Now it's time to build a table yourself.

Click New in the sandbox title bar and type Class Timetable, then press Enter. Now do each task and press Check.

What to remember

  • A table is made of rows, columns, and cells. The first row is usually the header row.
  • Insert a table from Insert > Table.
  • Tab moves to the next cell, and adds a row in the last cell.
  • Right-click to insert or delete rows and columns. Delete alone only clears text.
  • Table styles design the whole table in one click.
  • Borders draw lines; shading fills cells with color. Make the header row stand out.

In the next lesson, you'll add pictures to your documents and make them fit.