> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/tables/import-and-export-in-tables.md).

# Import & Export in Tables

Learn how to migrate CSV data into Diaflow Tables, validate cell values, configure export formats, and duplicate tables with active formula recomputation.

## Importing CSV Data into Tables <a href="#user-content-1-importing-csv-data-into-tables" id="user-content-1-importing-csv-data-into-tables"></a>

Diaflow Tables natively supports **Comma-Separated Values (`.csv`)** files, making it simple to migrate customer lists, product inventories, or historical transaction logs.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FScnwUwYshfABPikgQgw7%2Frounded-image%20(21).png?alt=media&amp;token=47ec2743-00f7-46f6-a1c0-4b1ec19de291" alt=""><figcaption></figcaption></figure>

### Import Targets <a href="#user-content-import-targets" id="user-content-import-targets"></a>

When uploading a CSV file, you can choose from three target destinations:

1. **New Table**: Creates a brand-new table container with an initial sheet populated by the CSV records.
2. **New Sheet in Existing Table**: Adds a tabbed sheet to an existing table container, keeping related operational datasets grouped together.
3. **Append to Existing Sheet**: Appends records directly to an active sheet without modifying the established schema.

### Smart Column Detection & Mapping Preview <a href="#user-content-smart-column-detection--mapping-preview" id="user-content-smart-column-detection--mapping-preview"></a>

* **Automatic Header Extraction**: Headers detected in row 1 of your CSV are automatically parsed as column names.
* **Intelligent Type Suggestion**: The system samples cell values to recommend appropriate column types (such as Number, Date, Text, or Select).
* **Interactive Mapping Modal**: Preview parsed columns before committing. You can adjust suggested types or exclude specific columns.

### Cell-Level Validation & Error Reporting <a href="#user-content-cell-level-validation--error-reporting" id="user-content-cell-level-validation--error-reporting"></a>

Traditional database imports frequently fail with ambiguous errors like `500 Server Error`. Diaflow Tables features **Cell-Level Validation**:

* If an incoming value fails validation (e.g., text in a strict numeric field or an invalid date string), Diaflow identifies the **exact row number and column name**.
* Human-readable error descriptions explain why the cell was rejected, allowing you to fix the file and re-import with confidence.
* Diagnostic alerts explicitly highlight duplicate header names rather than halting execution silently.

### Bulk Import Automation Guardrails <a href="#user-content-bulk-import-automation-guardrails" id="user-content-bulk-import-automation-guardrails"></a>

{% hint style="warning" %} <mark style="color:$warning;">**IMPORTANT**</mark>

**50-Trigger Batch Execution Cap**\
To prevent cascading load and API flooding when importing large files into automated tables: **A single bulk operation (such as a large CSV import) triggers at most 50 row-level automation executions.**\
For datasets with thousands of rows that require processing, use scheduled batch Flows or Action Cells instead of relying on real-time Row Created triggers.
{% endhint %}

### Step-by-Step CSV Import Guide <a href="#user-content-step-by-step-csv-import-guide" id="user-content-step-by-step-csv-import-guide"></a>

1. In your workspace sidebar, click **+ New** > select **Import CSV** (or inside an open table, click the **Sheet Options (•••)** menu > **Import CSV**).
2. Drag and drop your `.csv` file into the upload zone.
3. Review the detected sheet name (maximum **50 characters**, names matching `dfsheet_*` are rejected).
4. Inspect the column mappings and adjust types if necessary.
5. Click **Import Data**.

***

## Exporting Tables & Sheets <a href="#user-content-2-exporting-tables--sheets" id="user-content-2-exporting-tables--sheets"></a>

Export your structured data for business intelligence tools, executive presentations, or offline archive backups:

* **Supported Export Formats**: Export sheets to CSV (Comma-Separated Values).
* **Flexible Export Scope**:
  * **Export Current Sheet**: Downloads only the active sheet as a standalone file.
  * **Export Entire Table**: Packages all tabbed sheets contained within the table container.
* **Respect for Filters & Views**: You can choose to export the entire dataset or only records currently visible under your active filter, sort, and search criteria.

### How to Export Data

1. Open the table and select the sheet you wish to export.
2. Click the Download icon next to the Table Settings (•••) menu in the upper-right corner.
3. Choose your download scope (Export Current Sheet or Export Entire Table).
4. Click Confirm Export to generate and download your CSV file.

***

## Table & Sheet Duplication <a href="#user-content-3-table--sheet-duplication" id="user-content-3-table--sheet-duplication"></a>

Duplication enables teams to create reusable operational templates, snapshot quarterly metrics, or test new automation flows in a safe sandbox copy.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2F1R18seLvoQEYVJtpe0K6%2Frounded-image%20(22).png?alt=media&amp;token=2c6e500c-d160-4699-814e-13ecbc61d622" alt=""><figcaption></figcaption></figure>

### Duplication Modes <a href="#user-content-duplication-modes" id="user-content-duplication-modes"></a>

1. **Duplicating a Single Sheet**:
   * Right-click any sheet tab and select **Duplicate Sheet**.
   * **Toggle the "Duplicate data too" checkbox:** Leave it unchecked for Structure Only (copies columns, chip colors, validations, and formulas without rows), or check it for Structure + Data (exact clone of schema and records).
2. **Duplicating an Entire Table Container**:
   * From the sidebar or table header menu, select **Duplicate Table** to clone all sheets simultaneously.

### Active Formula & Link Recomputation <a href="#user-content-active-formula--link-recomputation" id="user-content-active-formula--link-recomputation"></a>

{% hint style="info" %}
**Dynamic Recomputation vs. Frozen Snapshots**\
Unlike tools that duplicate tables as static, frozen values, Diaflow Tables maintains **fully active, recomputed formulas and links**.\
Dependent formula expressions and cross-sheet relational lookups are automatically re-indexed in the duplicate copy, providing an immediately functional, living dataset.
{% endhint %}

***

## Governance & Best Practices <a href="#user-content-4-governance--best-practices" id="user-content-4-governance--best-practices"></a>

* **UTF-8 Encoding**: Save CSV files in standard UTF-8 format to preserve special characters and multilingual accents.
* **Audit Trails Preserved**: Duplicated records receive clean creation metadata while maintaining referential consistency.
* **Access Control**: Only members with edit permissions can initiate exports or duplications. Trashed tables must be restored before their data can be exported.
