IMPORT LAYOUT command

Imports an external table layout file (.layout) to an Analytics project.

Note

Prior to version 11 of Analytics, external table layout files used an .fmt file extension. You can still import a table layout file with an .fmt extension by manually specifying the extension.

Syntax

IMPORT LAYOUT external_layout_file TO table_layout_name

Parameters

Name Description
external_layout_file

The name of the external table layout file. If the file name or path includes any spaces it must be enclosed in quotation marks – for example, "Ap Trans.layout".

The .layout file extension is used by default and does not need to be specified. If required, you can use another file extension, such as .fmt.

If the layout file is not located in the same folder as the Analytics project, you must use an absolute path or a relative path to specify the file location – for example, "C:\Saved layouts\Ap_Trans.layout" or "Saved layouts\Ap_Trans.layout".

TO table_layout_name

The name of the imported table layout in the Analytics project – for example, "Ap Trans May". You must specify the table_layout_name as a quoted string if it contains any spaces. You can specify a table_layout_name that is different from the name of the external_layout_file.

Example

Importing an external table layout file

You import an external table layout file called Ap_Trans.layout and create a new table layout called Ap_Trans _May in the Analytics project:

IMPORT LAYOUT "C:\Saved layouts\Ap_Trans.layout" TO "Ap_Trans_May"

Remarks

When to use IMPORT LAYOUT

Importing an external table layout file and associating it with a data file can save you the labor of creating a new table layout from scratch:

  • If the imported table layout specifies an association with a particular Analytics data file (.fil), and a data file of the same name exists in the folder containing the project, the imported table layout is automatically associated with the data file in the folder.
  • If there is no data file with the same name in the project folder, you need to link the imported table layout to a new data source.

Table layouts and source data files must match

The imported table layout and the data file it is associated with must match. The structure of the data in the data file must match the field definitions specified by the table layout metadata.

Data structure refers to the data elements (fields) contained in a data file, the number and order of the fields, and the data type and length of the fields. If the table layout and the data file do not match, jumbled or missing data results.