Previous Topic

Next Topic

EDIExport - MaxBasic Function

EDIExport(Definition: String, File: String[, Append: Boolean]): Variant - OR -

EDIExport(Format: Number, Definition: String, File: String, [Append: Boolean [, SheetName: String]]): Variant

Runs an EDI export using a DI definition file Definition and an export file name File. If the optional Append parameter is True, the export will append to File, or it will overwrite. Returns True on successful export, False if export fails, Error if definition is not found.

EDIExport function syntax has these named arguments:

Parameter

Description

Format

Optional. If used Valid formats are 0 for Text export, or 1 for Excel export. If parameter is omitted Text export is implied.

Definition

Required. The name of the DI definition file.

File

Required. The file to export to.

Append

Optional. When True, will append the exported data to the File. When False, will overwrite the File.

SheetName

Optional. The name of the Excel Worksheet to export to.

Note: Do not use apostrophes (') in worksheet names, as this can cause problems.

To open the file in a new Script Editor window, place the cursor in the File Name and click Ctrl+Enter, or right click to open the Context Menu, then select Open Source.

This function accepts an infinite number of arguments after the required parameters, these may be accessed using the ScriptArgs function in the Definition script.

See Also

Import/Export Functions

Book Contents

Book Index