Overview
A number of macros that produce or modify tables share common capabilities as described below. A JavaScript enabled browser is required to enable most of these capabilities.
Capabilities
- Data filtering - filter table data by selecting the required value from the drop-down list under each column. Available from 8.3.0 version. Retains the row and column styles after filtering data (available since 8.2.0 version).
- Column sorting - sort a column by clicking on the column heading. Clicking again reverses the order.
- Data specific sorting - sort columns according to the type of data (text, numbers, dates, and so on). Click column heading to sort. See the Column types parameter for more information about supported data types.
- Column selection - show or hide specific columns using names or numbers.
- Download and export tables - download tables or export as an attachment as a CSV file (available from 8.1.0 version). Specify user-defined file delimiter (available since version 8.2.0) for the table view to be downloaded or exported.
- Auto sort of selected column - automatically sort the table based on a specific column name or number before rendering the table on the page.
- Auto numbering of rows - automatically add a leading column that contains the row number.
- Auto totaling of numeric columns - automatically total the numeric columns specified in Column types. See Column types for more information.
- Row highlighting on mouseover - highlight a row when the mouse goes over any row element for non-heading rows.
- Row styles - set CSS at the row level. Can override default Confluence styles to apply user-defined styles to each row cell directly. Available from 8.1.0 version
- Column styles - set CSS at the column level. Can override default Confluence styles to apply user-defined styles to each row cell directly. Available from 8.1.0 version
Column attributes - set HTML attributes for columns. Specify the required attributes in a comma-separated list where attributes for a column must be separated with double semi-colons (;;).
Certain attributes such as
style
,class
,colspan
,rowspan
, and so on, are rendered directly on the page. Other attributes are hidden from being displayed on the page but can be viewed from the page source (right-click the page and select View page source in most browsers).Table headers - show or hide table header rows. Depending on the number of header rows specified, the rows of the table are hidden. Available since 8.2.0 version.
Table attributes - set table class, table style, and row styles. See Style Table Columns.
In the macro editor window, all these common capabilities are logically grouped into various tabs based on the functionality for easy access and styling.
- Table settings:
- Formatting: Allows you to define the styles specific to the table like id, class, width and so on.
- Advanced settings: Allows you to define the advanced download and export options. Also, specify if you want to display the filter panel to display specific information. Filters are supported from 8.1.0 version.
- Column settings:
- Formatting - Allows you to define column styles such as fonts, colors, column width, column type, and other display attributes using CSS styles. In this panel, enter the number of columns you want to add, and click Start formatting to view the style parameters for all the columns in sequential order. You can add a column to the list by clicking Add formatting.
To define column attributes, click and select the Show column attributes option. The Show empty columns option, when selected displays the columns for which the styling is not defined. - Numbering & totaling - Allows you to define the numbering attributes like auto numbering the table, totaling the numeric columns and so on. Specify if you want to make custom defined column styles to override the default ones. Overriding default styles are supported from 8.1.0 version. You can now apply styles to the auto total row of your table from 8.2.0 version.
- Sorting - Allows you to define the sorting attributes like sorting the columns in ascending or descending order, displaying sort icon and so on.
- Formatting - Allows you to define column styles such as fonts, colors, column width, column type, and other display attributes using CSS styles. In this panel, enter the number of columns you want to add, and click Start formatting to view the style parameters for all the columns in sequential order. You can add a column to the list by clicking Add formatting.
- Row formatting:
- Data rows - Allows you to define row styles such as fonts, colors, and other display attributes using CSS styles. In this panel, enter the number of rows you want to add click Start formatting to view the style parameters for all the rows in sequential order. You can add a row to the list by clicking Add formatting.
- Header and footer rows - Allows you to define header and footer row styles. You can hide the header rows from display, available since 8.2.0 version.
- Advanced settings - Allows you to define advanced settings such as row highlight color and so on. Specify if you want to make custom defined row styles to override the default ones. Overriding default styles are supported from 8.1.0 version.
All the individual table, column, and row parameters are described in detail in the succeeding sections.
Macros that include this support
- Table Plus macro
- CSV (Comma Separated Values) macro
- Attachment Table macro
- JSON Table macro
- SQL macro
- SQL File macro
- SQL Query macro
Common parameters
The parameters listed on this page are a part of our common table capabilities that are available in many macros that produce or modify tables.
Styling guide
Utilize the common table capabilities of several Appfire (formerly Bob Swift) Atlassian apps including Advanced Tables for Confluence, SQL for Confluence, and others to achieve table styling.
For creative inspiration when styling your own Confluence Tables (including live examples), visit our Styling guide for tables.