---
title: "CSV (Comma Separated Values) macro - Cloud"
canonical: "https://support.appfire.com/space/TBL/74812384/CSV%20(Comma%20Separated%20Values)%20macro%20-%20Cloud"
format: markdown
---
> Macro (aura-html)

> ℹ️ Try our new Advanced Table Viewer macro for your CSV data. [Learn more](https://appfire.atlassian.net/wiki/spaces/TBL/pages/2112356514).

# <span style="color: #000000">Overview</span>

<span style="color: #000000">The </span><span style="color: #000000">*CSV (Comma Separated Values)*</span><span style="color: #000000"> macro can import, format, and display comma-separated values (CSV) data from anywhere, by:</span>

- <span style="color: #000000">Reading the CSV data from </span><span style="color: #000000">either</span><span style="color: #000000"> of these sources:</span>
  - <span style="color: #000000">Within your Confluence page</span>
  - <span style="color: #000000">From a page attachment in the same or different space</span>
- <span style="color: #000000">Allowing customizable delimiters, quote characters, and character encoding.</span>
- <span style="color: #000000">Supporting inclusion of wiki markup macros within the CSV data.</span>
- <span style="color: #000000">Leveraging the same table styling capabilities as the </span><span style="color: #000000">*Table Plus*</span><span style="color: #000000"> macro.</span>

<span style="color: #000000">CSV is not a formal standard, but the best reference is</span> [The Comma Separated Value (CSV) File Format](http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm)<span style="color: #000000">. The support in this macro comes close to mirroring this pseudo-standard. This macro supports certain</span> [common table capabilities](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74817747) <span style="color: #000000">with the other macros in this app and also other Bob Swift Atlassian apps.</span>

> 📝 By default, the CSV macro preserves extra spaces in CSV data between delimiters as valid column values.

# <span style="color: #000000">Basic use</span>

<span style="color: #000000">This macro can be added to a page using any of the following methods:</span>

| **Select from the macro browser (Insert elements)** | <span style="color: #000000">*CSV*</span><br>![click Insert elements and select CSV macro ](media://8f8e836d-e34b-4779-b5ed-5a8c0a901e7e) |
| --- | --- |
| **Markup shortcut (New editor - case insensitive)** | <span style="color: #000000">*/CSV*</span><br>![Insert CSV macro using macro shortcut](media://3cdf14b2-17ac-4af6-b79a-cef1d3ad00b7) |

# Parameters

The macro parameters are categorized into various tabs, such as **Content**, **Source**, **Structure and Data**, **Sort** **and Filter**, **Style**, and **Export**.

![CSV macro configuration dialog](media://1946d1a5-613e-49a3-b879-ea543ed73e90)


> ⚠️ <span style="color: #172b4d">**Parameters removed**</span>
> ⚠️ 
> ⚠️ - <span style="color: #172b4d">The </span>***URL user***<span style="color: #172b4d"> and </span>***URL user password***<span style="color: #172b4d"> parameters have been removed from the </span>***CSV***<span style="color: #172b4d"> </span><span style="color: #172b4d">***Table***</span><span style="color: #172b4d"> macro. </span>
> ⚠️ - <span style="color: #172b4d">Use a </span><span style="color: #172b4d">*[profile](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74812041/Configuration+-+Cloud#profiles)*</span><span style="color: #172b4d"> to access the data from a remote location.</span>

## <span style="color: #000000">Macro specific parameters</span>

| **Tab** | **Macro Editor Label** | **Default** | **Description** | **Macro Parameter** |
| --- | --- | --- | --- | --- |
| Content | Show wiki | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option 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.</span> | showWiki |
| Escape special characters in wiki markup | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to allow few special characters to be escaped so that the formatting is unaffected. When wiki output is requested (O</span><span style="color: #000000">*utput format*</span><span style="color: #000000"> is set to </span><span style="color: #000000">*wiki*</span><span style="color: #000000">), some special characters (like '</span><span style="color: #000000">**|**</span><span style="color: #000000">', '</span><span style="color: #000000">**[**</span><span style="color: #000000">', '</span><span style="color: #000000">**]**</span><span style="color: #000000">', '</span><span style="color: #000000">**{**</span><span style="color: #000000">', '</span><span style="color: #000000">**}**</span><span style="color: #000000">') in data can cause undesirable formatting of the table. By default, data that has wiki markup is  rendered correctly.</span> | <span style="color: #000000">escape</span> |
| Render wiki markup macros in body | false | Enable this option to render wiki markup macros found in the body prior to processing as CSV. This is useful to run macros from apps such as *Scripting for Confluence*, *Run CLI Actions in Confluence*, *SQL for Confluence*, or similar, that can produce CSV output. | macros |
| Source | Location of CSV data | <span style="color: #000000">macro body</span> | <span style="color: #000000">Specifies the list of options where CSV data is located. The included data follows the body data based on the location selected. The options are:</span><br>- <span style="color: #000000">*blank*</span><span style="color: #000000"> - Data is read from the contents in the macro body.</span>
- <span style="color: #000000">*^attachment*</span><span style="color: #000000"> - Data is read from an attachment that is available on the current page.</span>
- <span style="color: #000000">*page^attachment*</span><span style="color: #000000"> - Data is read from an attachment available on the specified page in the current space.</span>
- <span style="color: #000000">*space:page^attachment*</span><span style="color: #000000"> - Data is read from an attachment available on the specified page in a different space.</span> | <span style="color: #000000">location</span> |
| Profile |  | <span style="color: #000000">Enter the profile name from the list of pre-configured profiles. Contact your administrator to know about the profiles available for your use. Refer to the</span><span style="color: #800000"> </span>[Configuration documentation](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74812041/Configuration+-+Cloud#profiles)<span style="color: #800000"> </span><span style="color: #000000">to learn more about profile configuration.</span> | <span style="color: #000000">profile</span> |
| URL to CSV data |  | <span style="color: #000000">Enter the URL containing the required CSV files that are to be rendered.</span> <span style="color: #000000">If specified, the included data follows the body and script data.</span> | <span style="color: #000000">url</span> |
| URL connection timeout (milliseconds) |  | <span style="color: #000000">Enter time in milliseconds such that URL connections do not timeout before getting data. Use this to increase time needed for slow connections. Note that if a zero is given the connection may wait infinitely.</span> | <span style="color: #000000">timeout</span> |
| Structure and Data | Output format | *html* | Specify how the output is formatted. The options are as follows:<br>- *html* - data is entered as standard HTML directly in the macro body.
- *wiki* - data in the table rendered using the wiki renderer. | output |
| File encoding | System default | Specify the encoding for an external file, if different from the Confluence default (like Windows-1252, UTF-8, MacRoman). Refer to [this article](http://en.wikipedia.org/wiki/Character_encoding) for more information. Example: UTF-8. | encoding |
| Delimiter that separates columns | **,** (Comma) | Enter a delimiter to be used to separate column values when the table is downloaded or exported. The characters that can be used as delimiters are:<br>- *, or "," (comma)* - 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* - can be within double quotes with some restrictions. Examples: "**;**", "**=**". | delimiter |
| Quote character | double | Specify 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.<br>- double - Double quote character: **"**
- single - Single quote character: **'** | quote |
| Ignore trailing blank rows | true | Disable this option to show blank rows. A row is considered blank if all the columns selected by the *Columns to show* parameter are blank. | ignoreTrailingBlankRows |
| Augments to data row values |  | Enter a comma separated list of augments to the data row values, one for each column. Specify double quotes for values with a comma. See [Augments](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74815166) for details. | augments |
| Augments to heading row values |  | Enter a comma separated list of augments to heading row values, one for each column. See [Augments](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74815166) for details. | headingAugments |
| Augments to footing row values |  | Enter a comma separated list of augments to footing row values, one for each column. See [Augments](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74815166) for details. | footingAugments |

### <span style="color: #000000">Common parameters</span>

> Macro (include)

# <span style="color: #000000">Examples</span>

- <span style="color: #000000">[Format CSV data with CSV (Comma Separated Values) macro - Cloud](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74817820)</span>

# <span style="color: #000000">Other macros</span>

<span style="color: #000000">Below is a list of all other macros available within this app:</span>

- <span style="color: #000000">[Table Plus macro](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74812542)</span>
- [JSON Table macro](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74812316)
- [Attachment Table macro](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74812217)

# <span style="color: #000000">Additional references</span>

- [Augments](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74815166)
- [The Comma Separated Value (CSV) File Format](http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm)
- [Scripting for Confluence](https://appfire.atlassian.net/wiki/spaces/SCRP)
- [Run CLI Actions in Confluence](https://appfire.atlassian.net/wiki/spaces/CCLI)