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

# ExportToFile Method of the MrzData Object

This method exports the extracted data to a file in JSON/XML format with the default parameters.

## Syntax

### C++

```cpp theme={null}
HRESULT ExportToFile(
  BSTR                 FileName,
  MrzExportFormatEnum  Format
);
```

### C\#

```csharp theme={null}
void ExportToFile(
  string               FileName,
  MrzExportFormatEnum  Format
);
```

### Visual Basic .NET

```vb theme={null}
Sub ExportToFile( _
  FileName As String, _
  Format As MrzExportFormatEnum _
)
```

## Parameters

FileName

\[in] This variable contains the full path to the output file in XML/JSON format (see the description of formats in [XML Schema for MRZ](/fine-reader/engine/specifications/export-formats/xml-schema-for-mrz) and [JSON file for MRZ](/fine-reader/engine/specifications/export-formats/json-file-for-mrz)). If this file already exists, it is overwritten without prompt.

Format

\[in] This variable specifies the format of the output file. See the [MrzExportFormatEnum](/fine-reader/engine/api-reference/enumerations/mrzexportformatenum) description for the supported file formats.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## See also

[MrzData](/fine-reader/engine/api-reference/document-related-objects/mrzdata)

[Machine-Readable Zone Capture](/fine-reader/engine/guided-tour/basic-usage-scenarios-implementation/machine-readable-zone-capture)
