> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data export to file

> Export captured data to files in ABBYY FlexiCapture: choose XLSX, XLS, XML, CSV, TXT, DBF, or JSON formats and set folder structure and file naming.

To configure export to file, proceed as follows:

1. In the Document Definition editor window, click **Document Definition →** Export Settings...
2. Click Add... and select Export to data files in the **Type** field.
3. Specify whether export is obligatory.
4. Specify whether images should be exported.
5. Specify which documents (with and/or without errors) should be exported and click **Next>**.
6. Specify the export parameters and click **Next>**. The adjustable export parameters depend on the value specified in the Target field.
   * Recreate filenames and structure of Hot Folder subfolders.

If you select this value, the folder structure will mimic that in the Hot Folder the document images had been imported from. When configuring this export type, select the folder to mimic the Hot Folder structure in the Export path field.

* Export all documents to one file.

Select this value to export all data to one file. When configuring this export type, enter the path and the name of the file to export data to in the Export path field.

* Create a separate folder for each batch.

Select this value to export each document to a separate file:

* Specify the path and the first characters of the file name in the **File prefix** field.

* For each batch to be exported to a separate folder, select Create a separate folder for each batch.

* Create folder structure and filename using template.

If you select this value, file names and the subfolder structure will form depending on the document parameters.

* Specify the root export path in the Export path.
* Specify the file naming options. To do it, click Edit... and specify the necessary rules. For more information, see [Export file naming options](/flexi-capture/templates/export-file-naming).
* In the If file exists field, select the action for the program to carry out if a file with the generated name already exists.

The export path is specified relative to the root folder specified in [Project Properties](/flexi-capture/project-settings/project-properties). You only need to specify a name of subfolder to which documents will be saved. If you need to use the export path which is different from the root path in Project Properties, you need to specify the export path in UNC format (**\computer\_name\share\_name\[\path]**). Also, make sure all the stations involved in exporting have access to the specified location. Export errors will occur, if the path is specified in the following format: **\[path]**.

7. Select a [file saving format](/flexi-capture/appendix/saving-file-format), specify additional export properties for the selected file type, and select the text encoding, if necessary. Then click **Next>**.

<Accordion title="Microsoft Office Excel workbook (*.xlsx)">
  * Select Preserve value type on export to export the data basing on its types. Clear this option to export all data with the General type.\
    **Note:** Works only for the fields of the **Number** type.
  * Select Make separate files for repeatable items to export tables and fields with multiple repetitions to separate files. Mind the [note](/flexi-capture/templates/export-file#notes).
  * Configure the field names and format, if necessary. To do it, click Field Mapping and, in the Field Mapping dialog box, specify the field names and the format of fields with numbers and dates.
</Accordion>

<Accordion title="Microsoft Office Excel workbook (*.xls)">
  * Select the Excel version (5.0/95; 97-2003; 97-2003 (compatible with 5,0/95)).
  * Select Preserve value type on export to export the data basing on its types. Clear this option to export all data with the General type.\
    **Note:** Works only for the fields of the **Number** type.
  * Select Make separate files for repeatable items to export tables and fields with multiple repetitions to separate files. Mind the [note](/flexi-capture/templates/export-file#notes).
  * For Excel 5.0/95, select a code page. See [Export file formats](/flexi-capture/appendix/saving-file-format).
  * Configure the field names and format, if necessary. To do it, click Field Mapping and, in the Field Mapping dialog box, specify the field names and the format of fields with numbers and dates.
</Accordion>

<Accordion title="XML Document (*.xml)">
  * Specify the additional data to be exported (field locations and types, errors, recognition quality data).
  * Select Preserve value type on export if you want to save the xml-scheme with field type descriptions.
  * Select the encoding. See [Export file formats](/flexi-capture/appendix/saving-file-format).
  * Specify the field names, if necessary. To do it, click Field Mapping and, in the Field Mapping dialog box, specify the field names.
</Accordion>

<Accordion title="Comma-separated values file (*.csv)">
  * Select Column separator.
  * Select Make separate files for repeatable items, if you want tables and fields with multiple repetitions to be exported to separate files. Mind the [note](/flexi-capture/templates/export-file#notes).
  * Select the encoding and a code page. See [Export file formats](/flexi-capture/appendix/saving-file-format).
  * Configure the field names and format, if necessary. To do it, click Field Mapping and, in the Field Mapping dialog box, specify the field names and the format of fields with numbers and dates.
</Accordion>

<Accordion title="Text file (*.txt)">
  * Select Column separator.
  * Select Make separate files for repeatable items, if you want tables and fields with multiple repetitions to be exported to separate files. Mind the [note](/flexi-capture/templates/export-file#notes).
  * Select the encoding and a code page. See [Export file formats](/flexi-capture/appendix/saving-file-format).
  * Configure the field names and format, if necessary. To do it, click Field Mapping and, in the Field Mapping dialog box, specify the field names and the format of fields with numbers and dates.
</Accordion>

<Accordion title="DBase file (*.dbf)">
  * Select Preserve value type on export to export data basing on its types. Clear this option for all the fields to be of the Text type.
  * Select Make separate files for repeatable items, if you want tables and fields with multiple repetitions to be exported to separate files. Mind the [note](/flexi-capture/templates/export-file#notes).
  * Select a code page. See [Export file formats](/flexi-capture/appendix/saving-file-format).
  * Configure the field names, if necessary. To do it, click Field Mapping and, in the Field Mapping dialog box, specify the field names.
</Accordion>

<Accordion title="JSON Document (*.json)">
  * Specify the additional data to be exported (field locations and types, errors, recognition quality data).

  * Select Preserve value type on export to export the data basing on its types.

  * Select the encoding. See [Export file formats](/flexi-capture/appendix/saving-file-format).

  * Specify the field names, if necessary. To do it, click Field Mapping and, in the Field Mapping dialog box, specify the field names.
</Accordion>

<Warning>
  Complete steps 8 and 9 only if you selected the Save document images option in step 4.
</Warning>

8. If you want to save the images, specify the image saving parameters and click **Next>**.
   * Choose either to save images together with the data or to specify the image folder.
   * Select the image file naming scheme: similar to the data files or otherwise. See [Export file naming options](/flexi-capture/templates/export-file-naming).
   * Specify the fields that contain images you want to hide during export.
9. If images should be stored, specify image storage options and click **Next>**.
   * Select the image format, quality, and color.
   * To change the resolution of the source images, select Change resolution to and select the appropriate value from the list.
   * If you select PDF or PDF/A as a storage format, you can [create searchable PDF files](/flexi-capture/appendix/work-with-pdf).
10. Enter an export profile name and click **Finish**.

The program will export all values of document fields to one or more files of the specified format.

<a id="notes" />**Note:** By default, repeating fields (i.e., fields with multiple instances and tables) are exported into separate files for which a new folder is created. The name of the folder consists of the name of the export file. To disable export of repeating fields into separate files, clear the option Make separate files for repeatable items on the Export Destination Wizard tab (the option is available for all formats except XML). In this case, when repeating fields will be exported into one export file and the program will add a new line for each element instance.

<Note>
  When exporting data about exported images (images of pages or fields) to a file, the path to the file can be:
</Note>

* relative, if the images are being exported to the same folder as the file (or its subfolders)
* absolute in all other cases
