# Notation Guide

Print Help Tips
Tables

Tables allow you to organise content in a rows and columns, with a header row if required.

Notation Comment
|col A1|col A2|col A3|
|col B1|col B2|col B3|
Makes a table. Use double bars for a table heading row. Note that each table-row has to be defined on a single line.

The code given here produces a table that looks like:

col A1 col A2 col A3
col B1 col B2 col B3

{column:width=50%}
Text in this column.
{column}

Defines a single column.

• width: - (optional) the width of the column.
Must be defined in a section macro.

{section}

{column:width=30%}
Column one text goes here
{column}

{column:width=70%}
Column two text goes here
{column}

{section}

{section:border=true}
...
{section}

If you want to use columns instead of tables, you can define them first by marking a {section}, and then placing any number of {column}s inside.

• border: - (optional) set to "true" to draw a border around the section and columns.

{csv}
, January, February, March, April
Max, 37.5, 32.7, 28.0, 25.3
Min, 31.3, 26.8, 25.1, 18.7
{csv}

{csv:output=wiki|width=900|border=15|delimiter=whitespace}
Month Max Min Average
January 25.5 *6.3* 15.9
February 32.4 12.8 22.6
March 44.6 24.5 34.6
April 59.7 37.1 48.4
May 72.5 48.7 60.6
June 81.3 57.9 69.6
July 85.2 62.8 74
August 82.5 60.7 71.6
September 73.7 51.7 62.7
October 61.1 40.1 50.6
November 43.6 27.4 35.5
December 29.9 13.6 21.8
{csv}

Converts csv and other deliminated data into a table. CSV is not a formal standard, but the best reference is The Comma Separated Value (CSV) File Format. The support in this macro comes close to following this pseudo-standard. For more details see SCRP-16. This macro shares common table capabilities with other table based macros (excel, table-plus, and sql).

• output - Determines how the output is formated:
• html - Data is output as a HTML table (default).
• wiki - Data is output as a Confluence wiki table. Use this option if you want data within the table to be formated by the Confluence wiki renderer.
• script - Location of csv data. Default is the macro body only. If a location of data is specified, the included data will follow the body data.
• #filename - Data is read from the file located in confluence home directory/script/filename. Subdirectories can be specified.
• global page template name - Data is read from a global page template.
• space:page template name - Data is read from a space template.
• ^attachment - Data is read from an attachment to the current page.
• page^attachment - Data is read from an attachment to the page name provided.
• space:page^attachment - Data is read from an attachment to the page name provided in the space indicated.
• url - Specifies the URL of an csv file. If a url location is specified, the included data will follow the body and script data. Use of this parameter may be restricted for security reasons. See your administrator for details.
• footing - Number of rows to be considered footing rows (default is 0). Footing rows do not participate in sorting. An auto total row is automatically treated as a footing row.
• border - The border width in pixels. Defaults to normal table border width.
• width - The table width in pixels. Default is 100%.
• delimiter - Delimiter that separates columns. Note that trailing delimiters on a line result in a blank column at the end of the row.
• , or "," (comma) - The default column separator.
• whitespace - Blanks, tabs, and other white space are used to separate columns.
• tab - A single tab character is used to separate columns.
• blanks - Blank or blanks only.
• pipe - A single pipe (|) character is used to separate columns.
• other single character delimiter - may be within double quotes with some restrictions. Examples: ";", "=",
• columns - Comma separated list of column numbers in any order. Defaults to all columns in existing order. Columns are enumerated starting at 1.
• ignoreTrailingBlankRows - By default, all trailing blank rows will be ignored. A row is considered blank if all the columns selected by the column parameter are blank. Set ignoreTrailingBlankRows=false to show these blank rows.
• quote - the character used to represent quoted data. Quoted data may contain delimiters or new lines. Quote character must be doubled inside a quoted string.
• double - Double quote character (default).
• single - Single quote character.
• escape - When wiki output is requested (output=wiki), some special characters (like '|', '[', ']', '{', '}') in data may cause undesirable formatting of the table. Set escape=true to allow these special characters to be escaped so that it will not affect the formatting. The default is false so that data that has wiki markup will be handled correctly.
• showWiki - Default is false. Set to true to show a non-formatted version of the wiki table following the formatted table. This is used to help resolve formating issues.
{table-plus}
|| || January || February || March || April ||
| Max | 37.5 | 32.7 | 28.0 | 25.3 |
| Min | 31.3 | 26.8 | 25.1 | 18.7 |
{table-plus}

{table-plus:width=500|border=15|enhableHighlighting=false|columnTypes=S,F,F,F}
|| Month || Max || Min || Average ||
| January | 25.5 | *6.3* | 15.9 |
| February | 32.4 | 12.8 | 22.6 |
| March | 44.6 | 24.5 | 34.6 |
| April | 59.7 | 37.1 | 48.4 |

Other text can be here too!

|| Another table || | more data | {table-plus}

{table-plus:columnTypes=S,-,.|autoNumber=true|sortColumn=3
|columnAttributes=,,style="background:yellow; font-size:14pt;"}
|| Name || Phone || TCP ||
| John | 555-1234 | 192.168.1.10 |
| Mary | 555-2134 | 192.168.1.12 |
| Bob | 555-4527 | 192.168.1.9 |

{table-plus}

Adds column sorting and other attributes to one or more tables found in the body of the macro. The tables can be produced by wiki markup or other means. This macro shares common table capabilities with other table based macros (excel, csv, and sql).

• footing - Number of rows to be considered footing rows (default is 0). Footing rows do not participate in sorting. An auto total row is automatically treated as a footing row.
• width - The table width in pixels. Default is 100%.
• border - The border width in pixels. Defaults to normal table border width.
• multiple - Default is true which means all tables found within the macro body are processed. Set multiple=false to only process the first table found and may need to be used if the table includes cells that are also tables.
• Other parameters - Other parameters are passed through to the html table markup for more advanced capabilities or to override the default class

#### Common table capabilities

A javascript enabled browser is required to enable these capabilities. A number of table based macros (table-plus, csv, excel, and sql) share these common capabilities.

• Column sorting - sort a column by clicking on column heading. Clicking again will reverse the order. Auto sorting before display
• Row highlighting on mouse over - row is highlighted when mouse goes over any row element for non-heading rows
• Column attributes - ability to set the display attributes (color, font) on a column basis
• Auto numbering - ability to automatically add a leading column with the data row count.
• Auto totaling - ability to automatically add a footing row that totals all numeric columns.

Parameters - the following parameters control these common table capabilities:

• enableSorting - Set enableSorting=false to prevent sorting.
• enableHighlighting - As the mouse moves over a table row, the row will be highlighted by default. Set enableHighlighting=false to stop this behavior. This parameter was formerly known as highlightRow which still works.
• sortColumn - The table can be auto sorted before it is displayed by any valid column name or number provided by this parameter. No auto sorting will be done if this value is not provided or is invalid. A column number is a 1-based count of columns (excluding auto number column).
• sortDescending - If sortDescending=true, the sort indicated by the sortColumn will be done in reverse order.
• sortTip - Text that is used to provide user feedback with mouse is over a column heading that is sortable. Default text is: "Click to sort" followed by the column name if available.
• sortIcon - Default is false to not show a sort indicator icon. Set sortIcon=true to include a sort icon in the first heading row for sortable columns. An icon will show for the last column sorted indicating the direction the column was sorted.
• highlightColor - Color of row when mouse is over a row element. See Colors for how to specify.
• autoNumber - If autoNumber=true, an additional column will be added that will count each data row.
• autoTotal - If autoTotal=true, an additional row will be appended to the end of the table that will contain totals of all numeric columns.
• autoNumberSort - If autoNumberSort=true, the auto number column will be sortable and will retain the original data row count even after row sorting.
• columnTypes - By default, all columns are treated as strings for sorting purposes unless a more specific sort type is provided either by the macro logic or by this parameter. The parameter is a comma separated list of column type indicators to identify column types.
• S - string
• I - integer
• F - float
• C - currency or similar where it is a float value with pre or post characters
• D - date in the browser date format. More advanced date handling may be available on your server after installation of a date handling library. See online docmentation for more information.
• X - exclude this column from user selectable sorting
• . or - or : or / - separated numbers, like phone numbers or TCP addresses. Valid values are multiple integer numbers separated by one of the separators indicated by the type.
• H - hide the column.
• columnAttributes - A comma separated list of values used to modify cell attributes for all cells in a column. The position in the comma separated list corresponds to the column that the values apply to. Each value is a double semi-colon (;;) separated list of attributeName=value pairs that will be applied to the column cells.
• enableHeadingAttributes - By default, any column attributes provided will be applied to the all column rows including heading rows. Set enableHeadingAttributes=false to have the column attributes apply only to data rows.
• id - Sets the table id for the table for use in macros (like the chart macro) to identify a specific table.