# File Export from Table

Export a local table to a text file.

Action available for the following operating systems:

![](https://3821468174-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LrTlA1suFa5N48x_83N%2F-MAlPVpH3WRwBy16c7JY%2F-MAlQBZuuTnc6hyzKSVQ%2Fimage.png?alt=media\&token=5c9534b7-ca05-4ac4-b408-2207cd5a5295)

### Parameters

*Data*

* **Database Profile** *\<unquoted string> -* The name of the database profile to export.
* **File** *\<string> -* The full path and name of the file that the user wants to create with the exported data.
* **Encoding** *\<unquoted string> -* Indicates the file encoding to use.

1. Unicode UTF-16 LE (each character uses 2 bytes)
2. ANSI/BINARY (each character uses 1 byte)
3. Unicode UTF-8 (each character uses 1 byte to 4 bytes)

* **If File Exists** *\<unquoted string>* - Defines what to do when the file already exists. The possible values are: Replace, Append or dynamic.
* **SQL** *\<unquoted string>* - The SQL code to export the data.

&#x20;**Details**

* **Start of Record** *\<unquoted string>* - The string that identifies the start of the record in the text file.
* **End of Record** *\<unquoted string>* - The string that identifies the start of the record in the text file.
* **Field Separator** *\<unquoted string> -* The string separator for the elements between Start of Record and End of Record.

{% hint style="info" %}
The last three details parameters are coded.
{% endhint %}

* **Decimal Separator** *\<string>* - Defines a string separator that is used to separate the numeric values.

&#x20;*Columns*

* **Column** *\<unquoted string> -* The name of the table column where the data is exported.
* **Type** *\<unquoted string> -* The type of the data to be exported. The possible values are: String, numeric, Date, Time, Date Time or dynamic.&#x20;
* **Mask** *\<unquoted string> -* Defines if the user wants to apply a mask to the exported values.
* **Length** *\<numeric> -* Defines the length of the exported data.
* **Decimal Separator** *\<string> -* Defines a string separator that is used to separate the numeric values.
* **Decimal Part Length** *\<numeric> -* Defines the length of the numeric part.

{% hint style="info" %}
In Unicode UTF-16 LE, if the file does not exist or the **Replace** options is selected, the BOM (Byte Order Mark) 0xFEFF will be added to the beginning of the file. If the file already exists and the **Append** option is selected the first 2 bytes must be 0xFEFF.
{% endhint %}

{% hint style="info" %}
In Unicode UTF-8, if the file does not exist or the **Replace** options is selected, no BOM (Byte Order Mark) will be added. If the file already exists and the **Append** option is selected the first 3 bytes may optionally be 0xEFBBBF.
{% endhint %}

{% hint style="info" %}
The actions [File Open](https://doc.sysdevmobile.com/kalipso5/developing/form/actions/actions-description/group-files/file-open) and [File Close](https://doc.sysdevmobile.com/kalipso5/developing/form/actions/actions-description/group-files/file-close) don't need to be used.
{% endhint %}
