Syntax:
GATEWAY IMPORT WKS +
filename.wk1 {APPEND/APPEND_UPDATE/CREATE/REPLACE} +
<tablename> +
OPTION SHEET_INDEX 0 +
|SPECIFICATION_FILE_NAME filename +
|COLUMN_COUNT value +
|KEYS value +
|ADD_MAPPING value +
|AUTONUM value +
|FIRST_ROW n +
|LAST_ROW n +
|SHOW_PROGRESS value +
|MESSAGES value +
|ERROR_FILE EXCEPT.DAT
filename.wk1
This parameter defines the file name of the target file with data using the Lotus 1-2-3 format. File extension must be wk1.
APPEND
Adds the imported data to the end of the table or view specified in tblview.
APPEND_UPDATE
Updates the record if it exists in the tblview destination, otherwise the record is added. In order to specify a matching row for the UPDATE comparison, use the KEYS parameter.
CREATE
Creates a destination table with the same name as the imported file.
REPLACE
Replaces the rows in the table or view specified in tblview with the imported data.
tblview
Specifies the name of a table or view for import.
OPTION
ADD_MAPPING
This parameter assigns a source column to a destination table column, rather than relying on column position.
AUTONUM
This parameter specifies whether the data imported will follow the auto-numbering formula for the table. Available Parameters: ON / OFF
COLUMN_COUNT
This parameter specifies the number of columns to be imported from file. COLUMN_COUNT is only supported when using CREATE in the GATEWAY syntax.
ERROR_FILE
Specifies a file to capture errors encountered during the import process.
FIRST_ROW
This parameter specifies the first row(s) to be used within the file that is being imported into the table.
KEYS
This parameter specifies the matching row to compare for table updates with the APPEND_UPDATE import mode. For multiple key fields to locate a matching row, use a comma separated list of field names.
LAST_ROW
This parameter specifies the last row to be used within the file that is being imported into the table.
MESSAGES
If ON, during import process some messages will be displayed such as -ERROR- messages, if any. If OFF, the entire import process will be in "silent" mode. Available Parameters: ON / OFF
SHEET_INDEX value
This parameter is used to specify a specific sheet of the spreadsheet file, starting with 0.
SHOW_PROGRESS
Indicates whether to display status dialog during the import process. Set SHOW_PROGRESS to OFF if you wish to hide the animated status dialog during the import process. Available Parameters: ON / OFF
SPECIFICATION_FILE_NAME
This parameter is used to load a prepared specification with all pre-defined settings for importing. The import must be performed once using the graphic user interface and saved using the "Specifications.." button. The specifications will be stored in a file with the .RGW file extension. The .RGW file acts as a set of default values. Any value in the .RGW file will be overwritten by the same parameter specifically assigned by an OPTION parameter. Since the input file name is required in the GATEWAY command, the input file name in the .RGW will always be overwritten.
Examples:
GATEWAY IMPORT WKS D:\DataStore\Contacts.WK1 CREATE ContactsImport OPTION SHEET_INDEX 0|FIRST_ROW 2
GATEWAY IMPORT WKS D:\DataStore\Transactions.WK1 APPEND TransLog OPTION SHOW_PROGRESS OFF|MESSAGES OFF
--This command will only append cell B, cell C and cell D data into the Company, CustAddress and CustState columns of the Customer table.
GATEWAY IMPORT WKS Customer.WKS APPEND Customer +
OPTION ADD_MAPPING Company=B|ADD_MAPPING CustAddress=C|ADD_MAPPING CustState=D