DADiSP Worksheet Functions > Function Categories > Data Input/Output Functions > EXPORTFILE

 

EXPORTFILE

Purpose:

Exports a saved series to a data file.

Syntax:

EXPORTFILE("sername", "filename", filetype, exporttype, overwrite)

"sername"

-

A string, the full series name to export.

"filename"

-

Optional. A string, the export file name. Defaults to "export.dat".

filetype

-

Optional. An integer file type code. Defaults to 0. Valid arguments are:

 

Name

Code

Data Type

Range

ASCII

0

Comma/Space delimited data

N/A

SBYTE

1

Signed Byte

-128 to +127

UBYTE

2

Unsigned Byte

0 to 255

BYTE

2

(same as UBYTE)

0 to 255

SINT

3

Signed Integer

-32768 to +32767

UINT

4

Unsigned Integer

0 to 65536

LONG

5

4-byte Signed Integer

-2,147,483,648 to +2,147,483,647

FLOAT

6

4-byte Floating Point

-1037 to +1038

DOUBLE

7

8-byte Floating Point

-10-307 to +10-308

ULONG

8

4-byte Unsigned Integer

0 to 4,294,967,295

INT64

9

8-byte Signed Integer

-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807

UINT64

10

8-byte Unsigned Integer

0 to 18,446,744,073,709,551,615

 

exporttype

-

Optional. An integer, the header flag:

1:

Header and Data (default)

2:

Header Only

3:

Data Only

overwrite

-

Optional. An integer, the overwrite flag:

0:

Prompt to overwrite existing file (default)

1:

Overwrite existing file

Returns:

A 1 if export is successful; otherwise 0.

Example:

exportfile("RUN1.1.ANALOG1")

 

exports the series RUN1.1.ANALOG1 in ASCII format to the file export.dat.

 

exportfile("RUN1.1.ANALOG1", "myfile.bin", 7)

 

exports the series RUN1.1.ANALOG1 in binary DOUBLE format to the file myfile.bin.

Remarks:

EXPORTFILE is simply a non-GUI version of the built in export facility.

See Also:

IMPORTFILE

READA

READB

READTABLE

WRITEA

WRITEB