Availability
This routine is available since katl-commons 4.0.8 .
Syntax:
readFromCSVFile(path, hasHeader [, charset])
Description:
Read the text from the CSV file.Parameters:
Parameter name | Type | Required | Description |
---|---|---|---|
path | string | Yes | Specifies the file name to read from. |
hasHeader | boolean | Yes | Specifies if the file has header. |
charset | string | No | Specifies the charset used to read that file. |
Return type:
string
The text of the file
Example:
string fileContent = readFromCSVFile("C:/test.csv", true);
Notes:
- You can use absolute paths and relative paths to "sil.home".
- If the file is not found, an error will be raised.
See also: