---
title: "Configure CSV data source in Advanced Table Viewer macro"
canonical: "https://support.appfire.com/space/TBL/1782972884/Configure%20CSV%20data%20source%20in%20Advanced%20Table%20Viewer%20macro"
format: markdown
---
> Macro (aura-html)


This page details how to connect to a CSV data source and configure the Advanced Table Viewer macro.

## Insert the macro

Insert the macro in a Confluence page using the macro browser or the macro shortcut (/).

![Advanced Tables macro shortcut for inserting Advanced Table Viewer](media://cdeeb383-c9b9-4b40-8624-350573a05ebb)

## **Connect data source**

- On the initial setup screen, click **Connect Data Source**.

![connect datasource](media://6a37d824-bd7d-4142-a374-04aafcd19a9b)

- The *Select* *data source* dialog opens. By default, the CSV data connector is selected.
- For the CSV data connector, choose how you want to provide your CSV data. By default, **Upload file** is selected. Refer to [Configure the data source](#Configure-the-data-source).
  - **Upload file**: Upload a CSV file from your computer.
  - **Attachment**: Use a CSV file attached to the current Confluence page.
  - **URL**: Provide a URL to your CSV file.
  - **Insert CSV**: Type or paste CSV code directly into the macro.
  - **Profiles**: Select a predefined profile for the CSV file.

## Configure the data source 

> Macro (refined-tabs)
> 
> > Macro (refined-tab)
> 
> The **Upload file** option lets you to use a CSV file from your computer.
> 
> - Once you select **Upload file,** the macro displays the **Upload a file** field.
> - To upload a CSV file, click **Browse**.
> - Select a CSV file not exceeding 10 MB from your computer.
> - The **Select Columns** field displays the list of column names available from the CSV file.
> 
> > ❌ If the CSV file contains formatting errors or size exceeds 10 MB, the macro displays an error message. To learn about CSV file formats, refer to [The comma-separated value (CSV) File Format](https://www.creativyst.com/Doc/Articles/CSV/CSV01.shtml).
> 
> - For further configuration, proceed to the **Select and order columns** section on this page.
> 
> > Macro (refined-tab)
> 
> The Attachment option lets you to use a CSV file attached to the current Confluence page as your data source.
> 
> - Once you select **Attachment,** the macro displays the **Select page attachment **dropdown.
> - The **Select page attachment** dropdown lists the CSV files attached to the current page. Select the CSV file you want to use as your data source.
> - The **Select Columns** field displays the list of column names available from the CSV file.
> - For further configuration, proceed to the **Select and order columns **section on this page.
> 
> > ❌ If the CSV file contains formatting errors or size exceeds 10 MB, the macro displays an error message. To learn about CSV file formats, refer to [The comma-separated value (CSV) File Format](https://www.creativyst.com/Doc/Articles/CSV/CSV01.shtml).
> 
> > Macro (refined-tab)
> 
> The URL option lets you use a CSV file URL as your data source.
> 
> - Once you select the **URL **option, the macro displays the **Paste file URL **field.
> - In the** Paste file URL** field, type or paste the direct URL to your CSV file and click **Import data**.
> 
> > ℹ️ The macro supports only a direct link to a .csv file.
> > ℹ️ 
> > ℹ️ :check_mark: [https://abc.example.com/taxables.csv](https://abc.example.com/taxables.csv)
> > ℹ️ 
> > ℹ️ :cross_mark: [https://abc.example.com/taxables_download](https://abc.example.com/taxables_download)
> 
> - The **Select Columns** field displays the list of column names available from the CSV URL.
> - For further configuration, proceed to the **Select and order columns** section on this page.
> 
> > ❌ If the URL is invalid, or the CSV file contains formatting errors, or the file size exceeds 10 MB, the macro displays an error message. To learn about CSV file formats, refer to [The comma-separated value (CSV) File Format](https://www.creativyst.com/Doc/Articles/CSV/CSV01.shtml).
> 
> > Macro (refined-tab)
> 
> The Insert CSV option lets you use the CSV code directly in the macro. 
> 
> > ⚠️ Inserting a large amount of CSV code can affect the performance of your Confluence page. For large datasets, use the Upload file, Attachment, or URL option instead.
> 
> - Once you select **Insert CSV,** the macro displays the **Add your CSV **box.
> - In the** Add your CSV** box, enter or paste the CSV code and click **Save**.
> 
> > ❌ If the CSV code contains errors, the macro displays an error message. To learn about CSV file formats, refer to [The comma-separated value (CSV) File Format](https://www.creativyst.com/Doc/Articles/CSV/CSV01.shtml).
> 
> - For further configuration, proceed to the **Save and publish** section on this page.
> 
> > Macro (refined-tab)
> 
> The Profiles option lets you use a predefined profile for your CSV file. Administrators can configure Profiles in the Global Configuration.
> 
> > 📝 **Pre-requisite: **Make sure you have access to the required profiles, or contact your Administrator to define them. To configure profiles, refer to [Configuration-Cloud](https://appfire.atlassian.net/wiki/spaces/TBL/pages/74812041/Configuration+-+Cloud#profiles).
> 
> - Once you select **Profiles**, the macro displays the **Select a Profile** dropdown.
> - The **Select a Profile** dropdown lists the available profiles. Select the profile from which you want to import the data as a Confluence table.
> 
> > ❌ If data cannot be retrieved from the selected profile, the macro displays an error message.
> 
> - The **Select Columns** field displays the list of column names from the profile. For further configuration, proceed to the **Select and order columns** section on this page.
> 
> > Macro (refined-tab)
> 
> The **Select Columns** field displays the column names available to display in the table.
> 
> You can remove, select, and reorder the column names as needed. The column names appear in the Confluence table in the order you select them.
> 
> - **To clear all selected columns**
>   - To remove all column selections at once, click Clear All (:cross_circle: ). After clearing, click the field and re-select column names in the required order.
> - **To remove a specific column**
>   - Next to the column name, click :cross_circle: to remove it from the selection.
> - **To select columns**
>   - Click the **Select Columns** field and choose the column names from the dropdown. The order you select determines the column order in the table.
> 
> > ℹ️ The order in which you select the column names determines the column order displayed in the Confluence table.
> 
> Once you have selected the required columns, proceed to **Save and publish **section on this page.
> 
> > Macro (refined-tab)
> 
> - In the *Select data source* dialog, click **Save**.
> - The macro opens in setup mode, displaying the table with the selected column names and data.
> - In setup mode, you can configure various available features, such as column filtering, row styling, search, row numbering, sorting, download, and sum-up. Refer to <u>[Setup the Advanced Table Viewer macro features](https://appfire.atlassian.net/wiki/spaces/TBL/pages/1765147138)</u>.
> - To apply the configurations, click **Save**.
> - The configured table appears on the Confluence page in edit mode.
> - **Publish** the page to view the table in the page view mode.
> 
> Your CSV data is now ready to view and analyse directly within Confluence.

> ℹ️ To know about the various terms used in the macro, refer to the <u>[Advanced Table Viewer macro glossary](https://appfire.atlassian.net/wiki/spaces/TBL/pages/1765245023)</u>.