> For the complete documentation index, see [llms.txt](https://doc.sysdevmobile.com/kalipso5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.sysdevmobile.com/kalipso5/developing/form/actions/actions-description/group-files/file-export-from-table.md).

# File Export from Table

Export a local table to a text file.

Action available for the following operating systems:

![](/files/-MAlQBZuuTnc6hyzKSVQ)

### 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.

**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.

*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.
* **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](/kalipso5/developing/form/actions/actions-description/group-files/file-open.md) and [File Close](/kalipso5/developing/form/actions/actions-description/group-files/file-close.md) don't need to be used.
{% endhint %}
