CSV Load - < csv_file_load >() ... [Pro]
File CSV Load <csv_file_load>("File path",File handle variable) Available in: Professional edition
|
This command loads CSV file data. When data are loaded then "get record" command can be used in a loop to get fields for each record.
|
#
|
Parameter name
|
Parameter description
|
1
|
File path
|
(Full) path to the input CSV file.
|
2
|
File handle variable
|
Variable that receives CSV file handle. This variable is used as input parameter to "get record" command.
|
|
|
Example (Macro Steps):
|
1
|
<#> <#> This example shows how to parse CSV file
|
2
|
Macro execution: ONLY COMMANDS
|
3
|
<#> <#>Load CSV file
|
4
|
File CSV Load c:\data\file1.csv, File handle variable = vCsvFile,%p3_name =
|
5
|
<#> <#>Read all records in loop
|
6
|
Repeat steps UNTIL "1" (Counter variable initial value = "i=0", Counter loop increment = "1")
|
7
|
File CSV Get Record Fields (File handle variable = "vCsvFile", Variable array for fields = "vFields", Variable for number of fields = "vFieldsNum")
|
8
|
IF %vFieldsNum%<=0
|
9
|
<#> <#>No more records to process
|
10
|
Repeat steps BREAK
|
11
|
ENDIF
|
12
|
Repeat steps UNTIL "%r%
|
|