# File Export from Table

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/actions/group-files/file-export-from-table
>
> Exports data from a local table to a text file using an SQL query, with encoding, record delimiters and field separator options.

Export a local table to a text file.

Action available for the following operating systems:

![OS Supported: Android, iOS, Win, Win32](https://doc.sysdevmobile.com/kalipso/assets/images/01_Supported_OS-5c02a51fd5080a410a07ee3ef72b6872.png)

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

:::info
The last three details parameters are coded.
:::

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

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

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

:::info
The actions [File Open](https://doc.sysdevmobile.com/kalipso/6.1/documentation/actions/group-files/file-open.md) and [File Close](https://doc.sysdevmobile.com/kalipso/6.1/documentation/actions/group-files/file-close.md) don't need to be used.
:::
