Data import from CSV text file
The parameters for importing the list of variables from a text file of the CSV
type, are set in this window. Variables of the data page can be overwritten of newly added. It is possible to read from the file either everything or only the data from selected columns.
The window can be opened by the "Import" button on the "Data" page of the data objects PmData, PmOpcClientData, PmTrend, PmCommData, PmCommMsg.
| File to load||Reference to the disk file whose data have to be loaded|
|Column names are in the first file row||If checked, then there are column names in the first row in the file, i.e. the first row doesn't contain data.|
|Delimiter||Character that separates individual values in the file|
|Each value is closed by couple of characters||If any character is set here (option different from not closed), then it is supposed that each value in the file is closed from left and right by this character.|
| Type of loading|| Specifies if the list of variables on the data page will be overwritten, if variables will be newly added or if the list of variables will by synchronized with the data from the file. |
|Column list to load||List of columns whose data will be read from the file. Each row refers to any of the columns in the file either by the order or by the column name (if the file has names in the first row, see the configurator "Column names are in the first file row").|
Configurators of the window of the Edit button:
| Load value from file column||Specifies which data column will be read (by the index, the column name or it won't be read).|
| Column index in file||Data will be read from the column specified by its index|
| Column name in file||Data will be read from the column specified by its name|
| Use default value||If the data in the file is not entered (e.g. ..;;..) or it is set don't read the value in the Load value from file column configurator, then the value set in the Default value configurator is used for reading (if this option is checked).|
| Default value||See the configurator "Use default value".|
By the Save setting
button it is possible to save the setting into the INI file
, by the Load setting
button it is possible to load the setting from the INI
disk file (created formerly by the button for saving).
If the data are read from the *.CSV file to the Data objects page, then the data are read into the individual columns - Name, Data type, Value, Note,... On reading into the column Data type, it is necessary to ensure that the data in the *.CSV file refer to the strings in the selection window of the data type. Example of the data in the file: