---
title: "How to wrap CLI output in a CSV table"
canonical: "https://support.appfire.com/space/CCLI/3552247811/How%20to%20wrap%20CLI%20output%20in%20a%20CSV%20table"
format: markdown
---
> Macro (aura-html)

# Description

This article explains how to use the `--wrapmacro` parameter with the `csv` option to display CLI command results as a formatted CSV table on a Confluence page.

> ⚠️ **Prerequisite**: The `csv` wrap macro option requires [Advanced Tables for Confluence](https://marketplace.atlassian.com/apps/1219268/advanced-tables-for-confluence) to be installed on your site. Without it, the page displays `unknown macro: {csv}`.

# Instructions

1. Insert the **Run CLI Action** macro on your Confluence page, or create a CCLI profile for scheduled or automatic execution.
2. Set the action to one that produces tabular output, for example `searchUser`, `getPageTree`, or any list-type action.
3. Set the `--wrapmacro` parameter to `csv`:
4. Optional: customize the CSV macro rendering by passing additional parameters using `--wrapMacroParameters`:
5. View or render the page to see the results displayed as a CSV table.

> 📝 - The `--wrapmacro` parameter accepts two values: `noformat` (default, wraps output in `<pre>` tags) and `csv`.
> 📝 - If you want raw CSV text instead of a macro-wrapped table, use the `--file` parameter to write results to an attachment.
> 📝 - `--wrapMacroParameters` uses wiki-style pipe-delimited format: `key=value|key2=value2`.