LoadCSVFile Method (DATATABLE)
10.5, PLBCMP GUI Only
The LoadCSVFile method loads the contents of a CSV file into a DATATABLE. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A DATATABLE object.
return
Optional. A Numeric Variable that indicates the success or failure of the method.
fname
Required. A Character String Variable or literal that specifies the file name.
options
Optional. A decimal number or Numeric Variable that has a bit mask value described below.
delim
Optional. A Character String Variable or literal that specifies the delimiter character.
Flags Affected: EOS, OVER, ZERO
Note the following:
This method deletes all rows before loading.
The EOS flag is always cleared.
The ZERO flag is set if the {return} value is zero.
The OVER flag is set if the {return} variable is too small to receive the return value.
The {options} bit mask values indicate one of the following:
|
Value |
Constant |
Meaning |
|
0x1 |
$TBL_CSVRD_QUOTED |
Input is quoted. |
|
0x8 |
$TBL_CSVRD_INPUTHEADER |
Input the header column text |
|
0x10 |
$TBL_CSVRD_NOZEROWIDTH |
Input skips zero width columns |
If not specified, {delim} defaults to a comma.
A return value of zero (0) indicates success. Failures return one of the following values:
|
Value |
Meaning |
|
200 |
There is a file name problem. |
|
201 |
There are no columns defined in the DATATABLE. |
|
202 |
Unable to open the specified file. |
|
203 |
Unable to read the specified file. |
|
204 |
A long record was encountered. |
See Also: Method Syntax, DATATABLE Methods
![]() |