CSV Table macro - 8.x

CSV Table macro - 8.x

On this page

Overview

The CSV Table macro can import, format, and display comma-separated values (CSV) data from anywhere, by:

  • Reading the CSV data from any of these sources:

    • Within your Confluence page.

    • From a file residing on the Confluence server.

    • From a global or space template.

    • From a page attachment.

    • From an external URL.

  • Allowing customizable delimiters, quote characters, and character encoding.

  • Supporting inclusion of Wiki Markup macros within the CSV data.

  • Combining with the Chart macro to produce powerful data visualization.

  • Leveraging the same table styling capabilities as the Table Plus macro.

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. This macro supports certain Common table capabilities

Applicable upto app version 8.1:

To enable using HTML content with CSV data, you must enable the Stop encoding of html characters parameter. In such a case, it is recommended to contact your administrator to use Macro Security for Confluence with this app to provide an additional layer of security to your data and privacy. Refer to this documentation to for more information on the Macro Security for Confluence app.

From app version 8.2 onwards, if the Stop encoding of html characters parameter is enabled, use of Macro Security for Confluence is no longer needed as the macro itself provides additional security to your data

Basic use

This macro can be deployed using one of the following methods:

Selected from the macro browser

Advanced Tables - CSV Table

Markup shortcut

{csv}

Screenshot

Parameters

CSV Table settings

Tabs

Macro Editor Label

Default

Description

Macro parameter

Tabs

Macro Editor Label

Default

Description

Macro parameter

Data Source

 

 

Method of locating CSV data

macro body

Specifies the list of options where CSV data is located. The included data follows the body data based on the location selected.

  • Attachment - Data is read from the list of options selected for the following parameters:

    • Space - Lists all available spaces.

    • Page - Lists all the pages available from the selected space.
      The following options indicate:

      • @self - current space or page

      • @home - homepage of current space

      • @parent - parent page of current page or space

    • Attachment - Lists all the attachments from the selected page.

  • Filename - Data is read from the input specified in the File name field. You can specify the file located in Confluence home directory/script/filename, also subdirectories.

  • Template - Data is read from a global page template specified in the Name of the template field. 

  • URL - Data is read from the URL of CSV data, Username, Password, and Connection timeout fields that are explained in the succeeding rows.

  • Profile - Data is read from external applications such as GitLab and GitHub with a pre-defined set of parameters. If selected, you must then specify the profile (Profiles) and the URL (URL of CSV data) of the CSV file(s). Available from 8.1.0 version. 

script

Profiles

 

Contains a list of all profiles that are configured for this instance. Appears if Method of locating CSV data is set to Profile. Available from 8.1.0 version.

 

URL of CSV data 

 

Specifies the URL of a CSV file. If specified, the included data follows the body and script data. If a profile is specified in the Profiles field, enter the relative path of the actual location of the CSV file(s) here. Support for profiles is available from 8.1.0 version.

Use of this parameter may be restricted for security reasons. See your administrator for details.

url

Username (if required)

 

User name for URL access via basic authentication.

user

Password (if required)

 

User password for URL access via basic authentication. The Password is encrypted and remains secure (available from version 8.6.0).

If the first attempt fails while decrypting the password, the CSV Table macro initiates three retry attempts to decrypt the password. (Available since app version 8.7.1.)

password

Connection timeout

 

Allows setting the wait time for URL access for slower connections. Time in milliseconds.

timeout

File encoding

 

File encoding for an external file if different from the system default handling. Since 4.1.0. Example: UTF-8. Refer to this article for more information.

encoding

Data Format

Column delimiter

,

  • , (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 - To use pipe as a delimiter, enter the text ‘pipe’ as macro does not support pipe character(|) and throws an error message.

  • other single character delimiter - may be within double quotes with some restrictions. Examples: ";" and "=" work. "|" does not.

delimiter

Quote character

double

The character used to represent quoted data. Quoted data may contain delimiters or new lines. Quote character data must be doubled inside a quoted string.

  • double - Double quote character: "

  • single - Single quote character: '

quote

Data Settings

 

 

 

Columns to display

 

Comma separated list of column names or numbers in any order. Defaults to all columns in existing order. Columns are enumerated starting at 1.

columns

Output format

html

Determines how the output is formatted. Use wiki to have the data in the table rendered by the wiki renderer.

output

Ignore trailing blank rows

On

A row is considered blank if all the columns selected by the column parameter are blank. Turn this parameter Off to show these blank rows.

ignoreTrailingBlankRows

Show non-formatted version of  generated wiki

Off

Turn this parameter On to show a non-formatted version of the wiki table following the formatted table. This is used to help resolve formatting issues. It can also be used to convert CSV to Confluence markup by cut and paste.

showWiki

Escape special wiki characters

Off

Turn this parameter On to allow few special characters to be escaped so that the formatting is unaffected. When wiki output is requested (output=wiki), some special characters (like '|', '[', ']', '{', '}') in data may cause undesirable formatting of the table. The default is false so that data that has wiki markup is handled correctly.

escape

Render wiki markup macros in body

Off

Turn this parameter On to render wiki markup macros found in the body prior to processing as CSV. This is useful to run macros from Scripting for Confluence, Run CLI Actions in Confluence, SQL for Confluence, or similar that can produce CSV output.

macros

Stop encoding of html characters

Off

Server only. Turn this parameter On for CSV tables that use output=html and have HTML content. HTML content like <a href=http://google.com>google> displays as a link only if this parameter is enabled. Your administrator must grant specific users or groups to use this capability using Macro Security for Confluence.

disableAntiXss

Need support? Create a request with our support team.

Copyright © 2005 - 2026 Appfire | All rights reserved.