# Data Table

## Introduction

The DataTable library in Automate provides a set of actions to perform various operations on tabular data structures. These actions enable users to create, modify, and manipulate tables efficiently within Automate workflows.

The purpose of the DataTable library is to streamline the handling of tabular data, allowing users to create new tables, insert rows, find table lengths, remove duplicate rows, and update cell values.

## What is DataTable?

The DataTable library offers several actions to work with tabular data structures within Automate. These actions empower users to perform tasks such as creating new tables, inserting rows, finding table lengths, removing duplicates, and updating cell values with ease.

#### Key Features

* <mark style="color:orange;">**Create New Table:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Generate an empty table or define a table with specific rows and columns.</mark>
* <mark style="color:orange;">**Insert Row:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Add new rows to an existing table at specified indices.</mark>
* <mark style="color:orange;">**Find Table Length:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Determine the number of rows in a table.</mark>
* <mark style="color:orange;">**Remove Duplicate Rows:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Remove duplicate rows from a table.</mark>
* <mark style="color:orange;">**Update Cell Values:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Modify the values of cells within a table.</mark>

## How To Use Action

{% embed url="<https://drive.google.com/file/d/1zEd4ciNS0ZrNlLbJvvdZ2rquBLVFRK-X/view?usp=sharing>" %}

### Assign

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2Fs0nqGtCz7VaK0mZ5a6md%2Fimage.png?alt=media&#x26;token=310d15f6-afb8-406b-ab26-3898c6a144ec" alt=""><figcaption></figcaption></figure>

**Description:** The Assign action creates a new data table with specified parameters.

**Usage:**

1. <mark style="color:green;">**Empty Table:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Create an empty data table with a defined number of rows and columns.</mark>
2. <mark style="color:green;">**Table:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Create a data table with predefined values and headers.</mark>
3. <mark style="color:green;">**Variable:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Perform operations on an existing data table.</mark>

### Insert Row

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FU8MTMnu5pvDqYuvZmvxV%2Fimage.png?alt=media&#x26;token=76bd0b70-a1f9-4042-9865-32d9bedfce42" alt=""><figcaption></figcaption></figure>

**Description:** The Insert Row action adds new rows to an existing table.

**Usage:**

1. <mark style="color:green;">**Source Data Table:**</mark>  <mark style="color:green;"></mark><mark style="color:green;">Select the target table to insert rows into.</mark>
2. <mark style="color:green;">**Insert a Row at Index:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Specify where to add the new row:</mark>
   * <mark style="color:green;">First: Add data to the first row.</mark>
   * <mark style="color:green;">Last: Add data to the last row.</mark>
   * <mark style="color:green;">Specific: Add data to a specified index.</mark>
3. <mark style="color:green;">**Row Definition:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Define the row headers for the table.</mark>

### Length

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FYqC0FyK3eHuz9DnqK96e%2Fimage.png?alt=media&#x26;token=832bb1d4-193c-4eb6-93fb-2d309990a102" alt=""><figcaption></figcaption></figure>

**Description:** The Length action determines the number of rows in a table.

**Usage:**

1. <mark style="color:green;">**Source Data:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Select the target table to calculate the length.</mark>
2. <mark style="color:green;">**Assign the Output to Variable:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Store the table length value in a variable.</mark>

### Remove Duplicate Rows

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FIhYQJXH6t5awc1bbfz4z%2Fimage.png?alt=media&#x26;token=e1371434-7ac3-4ca8-a9b6-152e61e8ca9f" alt=""><figcaption></figcaption></figure>

**Description:** The Remove Duplicate Rows action eliminates duplicate rows from a table.

**Usage:**

1. **Data Table Name:** Choose the table from which to remove duplicates.

### Update Cell

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2Fu3i9sFGrEjk1KLMcoZyW%2Fimage.png?alt=media&#x26;token=57ce17c2-3f0d-4365-9076-e764c60479e5" alt=""><figcaption></figcaption></figure>

**Description:** The Update Cell action modifies the values of specific cells within a table.

**Usage:**

1. <mark style="color:green;">**Source Data Table:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Select the table to update.</mark>
2. <mark style="color:green;">**Row Index:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Specify the row number for the cell to update.</mark>
3. <mark style="color:green;">**Column Index:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Specify the column number for the cell to update.</mark>
4. <mark style="color:green;">**Value:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Enter the new value for the cell.</mark>

### **Add Row Numbers**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FoJWzj1LVb0vi4Om1qVFD%2Fimage.png?alt=media&#x26;token=45f49e51-31b1-462b-8f0c-120c8c841fd7" alt=""><figcaption></figcaption></figure>

**Description:** This action adds row numbers to a DataTable.

**Purpose:** It aids in tracking and organizing data by assigning sequential numbers to each row.

**Usage:** After selecting a DataTable variable, specify the starting number and, optionally, a new header name.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">New Header Name: If you want to add a title to the sorting, fill in this field.</mark>
* <mark style="color:green;">Starts From Number: Default value 1, e.g., 3.</mark>

**Outputs:** The DataTable with row numbers added.

### **Fill Blank Cells**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2F9Xl6ZhTVfj01frLU2Izq%2Fimage.png?alt=media&#x26;token=8d45ad69-c280-4df3-b950-cf013a2a1e85" alt=""><figcaption></figcaption></figure>

**Description:** This action fills blank cells in a DataTable with specified values.

**Purpose:** It ensures consistency in data representation by replacing blank cells with meaningful values.

**Usage:** Select a DataTable variable and choose filling type. Specify the value to fill blank cells.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">All Columns or Selected Columns.</mark>
* <mark style="color:green;">Filling Type: Value from above, below, left, right, or custom value.</mark>

**Outputs:** The DataTable with blank cells filled.

### **Filter Rows**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FfwAudWGeLEXALf9ifKtk%2Fimage.png?alt=media&#x26;token=e2b4906d-f5ce-4cee-9254-2f7238087429" alt=""><figcaption></figcaption></figure>

**Description:** This action filters rows in a DataTable based on specified criteria.

**Purpose:** It extracts subsets of data that meet specific conditions, facilitating data analysis and reporting.

**Usage:** Select a DataTable variable and specify filtering criteria. Assign the filtered result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Filter with Headers: Yes or No.</mark>
* <mark style="color:green;">Value to Assign(Required): Select a variable of type data table.</mark>

**Outputs:** The filtered DataTable.

### **Find & Clean**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FmI54rXmkzCG5JJzT2Sgg%2Fimage.png?alt=media&#x26;token=ca711742-30eb-423e-a7dc-61c7b15c29e8" alt=""><figcaption></figcaption></figure>

**Description:** This action finds and cleans specified elements in a DataTable.

**Purpose:** It standardizes data format by removing unwanted characters or patterns.

**Usage:** Select a DataTable variable and specify cleaning criteria. Assign the cleaned result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">All Columns or Selected Columns.</mark>
* <mark style="color:green;">Cleaning Type: Clean all spaces, characters, punctuations, numbers, non-numbers, leading spaces, or trailing spaces.</mark>
* <mark style="color:green;">Contains a Header: Yes or No.</mark>

**Outputs:** The cleaned DataTable.

### **Find & Replace**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FKVAsnHQz94HVAOAp5TY3%2Fimage.png?alt=media&#x26;token=f079bbe7-de70-4b56-ba3e-d2359da07ec1" alt=""><figcaption></figcaption></figure>

**Description:** This action finds and replaces specified values in a DataTable.

**Purpose:** It facilitates data correction and normalization by replacing old values with new ones.

**Usage:** Select a DataTable variable and specify find and replace criteria. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">All Columns or Selected Columns.</mark>
* <mark style="color:green;">Contains a Header: Yes or No.</mark>
* <mark style="color:green;">Find(Required): Value to find.</mark>
* <mark style="color:green;">Replace(Required): Value to replace with.</mark>
* <mark style="color:green;">Case Sensitive: Yes or No.</mark>

**Outputs:** The DataTable with values replaced.

### **Find Max By Group**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FmqeHd5Dmb8RUMuipyJ3z%2Fimage.png?alt=media&#x26;token=df4a894e-467c-47c2-9a2e-bcf928ce23a3" alt=""><figcaption></figcaption></figure>

**Description:** This action finds the maximum value in specified columns grouped by unique columns.

**Purpose:** It identifies the highest values within groups of related data.

**Usage:** Select a DataTable variable and specify columns for finding maximum values. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Enter the column(s) for maximum values.</mark>
* <mark style="color:green;">Enter the name/index of the unique column(s).</mark>
* <mark style="color:green;">Contains a Header: Yes or No.</mark>
* <mark style="color:green;">Value to Assign(Required): Select a variable of type data table.</mark>

**Outputs:** The DataTable with maximum values by group.

### **Find Min By Group**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FnwiyLjWyBvu3Gup3P6KZ%2Fimage.png?alt=media&#x26;token=c0d60480-29a1-4564-920f-f9a056784134" alt=""><figcaption></figcaption></figure>

**Description:** This action finds the minimum value in specified columns grouped by unique columns.

**Purpose:** It identifies the lowest values within groups of related data.

**Usage:** Select a DataTable variable and specify columns for finding minimum values. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Enter the column(s) for minimum values.</mark>
* <mark style="color:green;">Enter the name/index of the unique column(s).</mark>
* <mark style="color:green;">Contains a Header: Yes or No.</mark>
* <mark style="color:green;">Value to Assign(Required): Select a variable of type data table.</mark>

**Outputs:** The DataTable with minimum values by group.

### **Limit Rows**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FUutFQ3WGrkgbZxTnkV8r%2Fimage.png?alt=media&#x26;token=d538739b-ca02-408a-9d1e-d4b3eea52752" alt=""><figcaption></figcaption></figure>

**Description:** This action limits the number of rows in a DataTable.

**Purpose:** It restricts the size of the DataTable to focus on specific data subsets.

**Usage:** Select a DataTable variable and specify the row limit. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Limit(Required): Number of rows to retain.</mark>
* <mark style="color:green;">Contains a Header: Yes or No.</mark>
* <mark style="color:green;">Value to Assign(Required): Select a variable of type data table.</mark>

**Outputs:** The DataTable with limited rows.

### **Math By Group**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2F13DEdptWOvfluT1k2ccr%2Fimage.png?alt=media&#x26;token=0bb192cb-91d0-4290-8198-19404da66e02" alt=""><figcaption></figcaption></figure>

**Description:** This action performs mathematical operations on columns grouped by specified criteria.

**Purpose:** It calculates aggregated values for data subsets based on grouping criteria.

**Usage:** Select a DataTable variable and specify the math type, columns, and grouping criteria. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Math Type: Sum, Average, or Count.</mark>
* <mark style="color:green;">Select All Columns or Sum These Columns.</mark>
* <mark style="color:green;">Group By Columns.</mark>
* <mark style="color:green;">Value to Assign(Required): Select a variable of type data table.</mark>

**Outputs:** The DataTable with aggregated values by group.

### **Merge Columns**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FoFizRLMJQBVUDn61Emmc%2Fimage.png?alt=media&#x26;token=42ed05cb-b51b-443c-8904-e171ca5efa71" alt=""><figcaption></figcaption></figure>

**Description:** This action merges specified columns in a DataTable into a new column.

**Purpose:** It combines information from multiple columns into a single column for analysis or presentation.

**Usage:** Select a DataTable variable and specify columns to merge. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Delimiter: Separator for merged values.</mark>
* <mark style="color:green;">Contains Headers: Yes or No.</mark>
* <mark style="color:green;">New Column Name(Required): Specify the name for the new column.</mark>
* <mark style="color:green;">Select All Columns or Selected Columns.</mark>

**Outputs:** The DataTable with merged columns.

### **Merge Duplicate Rows**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FRP9vIyctZdZksI4uFlnx%2Fimage.png?alt=media&#x26;token=ac354b50-0d25-423c-85f7-01b368705285" alt=""><figcaption></figcaption></figure>

**Description:** This action merges rows with duplicate values in specified columns within a DataTable.

**Purpose:** It consolidates duplicate rows to simplify data analysis and processing.

**Usage:** Select a DataTable variable and specify columns for uniqueness and merging. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Enter the name/index of the unique column(s).</mark>
* <mark style="color:green;">Enter the name/index of the merge column(s).</mark>
* <mark style="color:green;">Delimiter: Separator for merged values.</mark>
* <mark style="color:green;">Contains Header: Yes or No.</mark>
* <mark style="color:green;">Only Merge Unique Values: Yes or No.</mark>
* <mark style="color:green;">Ignore Blanks: Yes or No.</mark>
* <mark style="color:green;">Value to Assign(Required): Select a variable of type data table.</mark>

**Outputs:** The DataTable with merged duplicate rows.

### **Merge Tables**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2F28PY0aiCFZOrnTHzREEA%2Fimage.png?alt=media&#x26;token=ef03c52e-7d1e-451f-b7a1-e328c8fbc63c" alt=""><figcaption></figcaption></figure>

**Description:** This action merges two DataTables into a single DataTable.

**Purpose:** It combines data from multiple sources into a unified dataset.

**Usage:** Select two DataTable variables and specify merging options. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Main Table(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">TABLES(Required): Select another variable of type data table.</mark>
* <mark style="color:green;">Contains Header: Yes or No.</mark>
* <mark style="color:green;">Merge Data By Column Names: Yes or No.</mark>
* <mark style="color:green;">Value to Assign(Required): Select a variable of type data table.</mark>

**Outputs:** The merged DataTable.

### **Replace with Regex**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FdZ8VAyJbJXNv9JotAMLh%2Fimage.png?alt=media&#x26;token=deb38a2e-4a86-4839-9264-7639ec38d64d" alt=""><figcaption></figcaption></figure>

**Description:** This action replaces values in a DataTable using regular expressions.

**Purpose:** It allows for complex pattern-based replacements in the data.

**Usage:** Select a DataTable variable and specify regex pattern and replacement value. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">All Columns or Selected Columns.</mark>
* <mark style="color:green;">Regex(Required): Regular expression pattern.</mark>
* <mark style="color:green;">Value(Required): Replacement value.</mark>

**Outputs:** The DataTable with values replaced using regex.

### **Rotate Table**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2Fl3fgTJ4zJa4jKsFO5pGd%2Fimage.png?alt=media&#x26;token=dc24974c-879e-4e61-894f-5b2c2367014c" alt=""><figcaption></figcaption></figure>

**Description:** This action rotates a DataTable so that the first column becomes the header row.

**Purpose:** It transforms the structure of the DataTable for better visualization or analysis.

**Usage:** Select a DataTable variable. This action directly modifies the structure of the DataTable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>

**Outputs:** The rotated DataTable.

### **Sort Rows**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FI087oyzTOEh0zUaRN8CG%2Fimage.png?alt=media&#x26;token=be08b5a8-5044-484e-acae-efe9afdbb85e" alt=""><figcaption></figcaption></figure>

**Description:** This action sorts rows in a DataTable based on specified criteria.

**Purpose:** It arranges data in a specific order for easier interpretation and analysis.

**Usage:** Select a DataTable variable and specify sorting options. Assign the sorted result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Ascending or Descending: Order of sorting.</mark>
* <mark style="color:green;">Column Index or Column Name: Choose one.</mark>
* <mark style="color:green;">Column(Required): Name or index of the column to sort by.</mark>
* <mark style="color:green;">Sort with Header: Yes or No.</mark>

**Outputs:** The sorted DataTable.

### **Split Columns**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FSXelAyg18Mn6qzTzo47C%2Fimage.png?alt=media&#x26;token=68d4dc34-121f-47af-8256-e11081a01a55" alt=""><figcaption></figcaption></figure>

**Description:** This action splits a column in a DataTable into multiple columns based on a specified delimiter.

**Purpose:** It separates combined data in a single column into distinct categories for analysis.

**Usage:** Select a DataTable variable and specify the column to split and the delimiter. Assign the result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">Column Index or Column Name: Choose one.</mark>
* <mark style="color:green;">Column(Required): Name or index of the column to split.</mark>
* <mark style="color:green;">Delimiter(Required): Separator for splitting.</mark>
* <mark style="color:green;">Contains Header: Yes or No.</mark>

**Outputs:** The DataTable with split columns.

### **Text Formatting**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2F5TcsXod55R1tjrOB0Yvn%2Fimage.png?alt=media&#x26;token=53bc2d9e-9380-4248-b395-adbdcea4de83" alt=""><figcaption></figcaption></figure>

**Description:** This action formats specified columns in a DataTable based on specified criteria.

**Purpose:** It standardizes the format of data for consistency and clarity.

**Usage:** Select a DataTable variable and specify formatting options. Assign the formatted result to a new variable.

**Inputs:**

* <mark style="color:green;">Source Data(Required): Select a variable of type data table.</mark>
* <mark style="color:green;">All Columns or Selected Column: Choose one.</mark>
* <mark style="color:green;">Format Type: Capitalized, Lower Case, or Upper Case.</mark>
* <mark style="color:green;">Contains Header: Yes or No.</mark>

**Outputs:** The DataTable with formatted columns.

### **Export to CSV**

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2F0BZHtT5Wo8tKh4drK3Mi%2Fimage.png?alt=media&#x26;token=a8fcf7d9-a022-42dd-b362-b03f1225acd0" alt=""><figcaption></figcaption></figure>

**Description and Purpose:** This action aims to export a data table as a CSV file to the Mate Database or a specified local environment. This provides flexibility in exporting operations for data table usage.

**Usage:** To use this action, the user must first define the Source Data. This involves creating a variable of type "data table" in the variable section or by clicking on the plus button to create the data table directly.

Next, the user must define the separator for the CSV file. Autom Mate offers two options: a comma or a semicolon.

Users then need to specify the folder path within the Mate Drive for storing the CSV file. Alternatively, if exporting to a local environment, the Autom Mate server must be installed in that environment. Users can specify the folder location directly or define the local environment as a string-type variable and assign it accordingly *(e.g., C:\Autommate\test folder)*.

Another essential configuration involves defining the exported file's name. Autom Mate allows users to make the file name unique by appending a random number (e.g., filename\_123.csv) or to overwrite an existing file with the same name.

Lastly, the user has the option to assign the file path to a variable, which must be of type string.

**Inputs:**

* <mark style="color:green;">**Source Data:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Define a variable of type "data table" in the variable section or create a new data table.</mark>
* <mark style="color:green;">**Separator:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Choose between a comma or a semicolon.</mark>

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FYhbPKhHjpY2wauuFUlU6%2Fimage.png?alt=media&#x26;token=1e391182-f0d6-4435-8318-0f1ba1268ddd" alt=""><figcaption><p>Output views</p></figcaption></figure>

* <mark style="color:green;">**Folder Path:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Specify the folder path in the Mate Drive or the local environment</mark> <mark style="color:green;"></mark>*<mark style="color:green;">(e.g., C:\Autommate\test folder)</mark>*<mark style="color:green;">.</mark>
* <mark style="color:green;">**File Name:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Define the exported file name with options to make it unique or overwrite existing files.</mark>
* <mark style="color:green;">**File Path Variable (Optional):**</mark> <mark style="color:green;"></mark><mark style="color:green;">Assign the file path to a variable of type string.</mark>

**Action Output:** The successful export of the data table as a CSV file to the specified location, either within the Mate Database or the local environment.

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FqVufUuuTvL9BWVEAmQNh%2Fimage.png?alt=media&#x26;token=c9f5b4ac-45c3-4cc9-aed3-8c168bf07841" alt=""><figcaption><p>Mate Drive</p></figcaption></figure>

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FmRAgVtYUQ0DOsdTVFCLM%2Fimage.png?alt=media&#x26;token=29dfe353-94cb-4ab5-9334-7f7ff0e41633" alt=""><figcaption><p>Output Data</p></figcaption></figure>

***

## Additional Tips

### [**Use Cases**](https://docs.autommate.com/userguide/use-cases)

### [FAQ](https://docs.autommate.com/userguide/faq)
