|
Read from CSV file.
syntax
LoadCsvFile(
fileName,
&data
[,bHeader = FALSE]
[,&headerData]
[,firstLineStr = ""]
[,endLineStr = ""]
)
Parameters
fileName
|
|
Type:
|
character
|
|
File name.
|
&data
|
|
Type:
|
Character Array
|
|
Variable for storing the contents of the CSV file. The contents are obtained as a two-dimensional array. The contents are referenced by data[ column, row].
|
bHeader
|
|
Type:
|
Boolean
|
|
When TRUE is selected, the first line of the CSV file will be treated as a title line and will not be included in the data.
|
&headerData
|
|
Type:
|
Character Array
|
|
When bHeader is TRUE, the first line of the CSV file is considered to be the title line, and the contents of that title are stored in headerData.
|
firstLineStr
|
|
Type:
|
character
|
|
If firstLineStr is specified, a line that matches that character is searched for and the next line is read.
|
endLineStr
|
|
Type:
|
character
|
|
If endLineStr is specified, a line that matches that character is searched for and up to the previous line is read.
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Explanation
Reads from a CSV file. This function cannot be used unless you log in to the server.
|
Example
|
var a;
::LoadCsvFile("c:\abc.csv", a);
xxx.Text = a[0, 0]; // Data in column 0, row 0
xxx.Text = a[0, 1]; // Data in column 0, row 1
xxx.Text = a[0, ]; // All data in column 0
xxx.Text = a[0, 10:20]; // 11 pieces of data from column 0, rows 10 to 20
xxx.Text = a[, 0]; // All data in row 0
|
|
Supported
reference
LoadTextFile
SaveTextFile
LoadCsvFile
SaveCsvFile
SavePrintText
GetTempFolder
GetTempFile
GetCurrentFolder
GetModuleFolder
GetFileSize
GetFileLastWriteTime
GetLogicalDrives
GetDriveType
EncryptFile
DecryptFile
SetClipboardData
GetClipboardData
|