Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides an example to make user defined styles persist for columns. For this example, let's consider the Monthly Temperatures Table, for which you want to set background colors of and borders of various columns, and auto-number all the rows.

Select this macro

Macro nameTable Plus
Macro syntax{table-plus}


Define these parameters/values

Column settings > Formatting > Column Styles (1

2

3

4)

background:lightgrey; text-align:centerpadding:15px;

background:lightblue; color:teal

background:lightyellow; text-align:rightborder: 3px dotted green;

2

Column settings > Numbering & Totaling > Insert auto number columnOn
Column settings > Numbering & Totaling > Auto number column stylesborder: 5px solid #c1c7d0;
Column settings > Numbering & Totaling > Apply Column styles to data column cellsOn


Note

Observe that column 1 styling is repeated in column 4, but, value 2 is used instead of 1. This is because Insert auto number column in On.

Screenshots

Image RemovedImage Added   Image Added

Image Removed

Example result

Table when When the Apply Column styles to data column cells was off is off, certain styles like the padding and the text color are not applied as shown:

Image RemovedImage Added

Table when When the Apply Column styles to data column cells is toggled on:

Image Removed

Here, now the first column and the fourth column with text-align:center now displays correctly, as well as the style specified in the third column.the table is displayed with all the specified styles as shown:

Image Added