exportData

Exports the data from the current form in either XDP or XML format to a file.

For security reasons, if you provide the first parameter, the exportData method executes only when performed on certified documents. If you do not provide the first parameter, the document does not need to be certified and the user is prompted to provide a location and filename.

Syntax

Reference_Syntax.exportData( [ STRING param1 [, BOOLEAN param2 ] ])

Parameters

param1 (Optional)

Specifies the location and file name of the file where the data will export. If you omit this parameter, a dialog box opens to let the user select the file manually.

This parameter is only valid on certified documents where the user has sufficient permissions.

param2 (Optional)

Specifies the export format for the data.

  • true | 1 (JavaScript) or 1 (FormCalc) (Default)

  • Export to XDP format.

  • false | 0 (JavaScript) or 0 (FormCalc)

  • Export plain XML data.

To change the export type without specifying a file name, you must provide an empty string as the first parameter. For example:

xfa.host.exportData("",0); //JavaScript 
xfa.host.exportData("", 0) //FormCalc

Returns

Empty

Applies to

Version

XFA 2.1

Examples

JavaScript

xfa.host.exportData("filename.xdp");

FormCalc

xfa.host.exportData("filename.xdp")

// Ethnio survey code removed