IMPORTFILE

Purpose:

Imports a single data file into the current Labbook.

Syntax:

IMPORTFILE("filename", "headerfile", autoload, overwrite, onewin, color, impmode)

"filename"

-

A string. The name of the file to import.

"headerfile"

-

Optional. A string, the header file.

autoload

-

Optional. An integer, the series load flag.

0:

Do not load series into Windows (default).

1:

Automatically load series into Windows.

overwrite

-

Optional. An integer, the overwrite flag if autoload is 1.

0:

Do not overwrite existing series in a Window.

1:

Overwrite existing series in a Window with series from the imported file (default)

onewin

-

Optional. An integer, load series into a single Window if autoload is 1

0:

Do not load into one window, load the series into multiple windows instead.

1:

Load all the series into the current window (default). In this case, overwrite has no effect; the data in the current window is overwritten.

color

-

Optional. An integer, the onewin color mode.

0:

Load the series into one window using the same color (default).

1:

Load the series into one window using separate colors.

impmode

-

Optional. An integer, the import save mode.

0:

Standard import processing, prompt if series conflict (default).

1:

Replace any existing saved series with the imported series..

2:

Append the imported series to any existing saved series..

3:

Preserve existing saved series and skip the conflicting imported series.

4:

Cancel the entire import operation if any series conflicts are detected.

Example:

importfile(gethome + "\data\impthree.dat", 1, 1, 1, 1, 0)

 

imports the file, impthree.dat, into the current Labbook. The imported series are loaded into the current window using separate colors.

Example:

importfile("data.dat")

 

imports the file, data.dat, into the current Labbook. If the data file does not contain a DADiSP header, the standard importing defaults are used.

 

importfile("data2.dat","data2.hed",1)

 

imports the file, data.dat, using the header file, data2.hed, into the current Labbook, and automatically loads the Dataset into the current Window.

Remarks:

IMPORTFILE is a non-GUI version of the built in single file import facility.

 

See IMPORTSELECT to import multiple files from a folder.

See Also:

EXPORTFILE

IMPORTSELECT

LOADDATASET

READTABLE