Skip to end of banner
Go to start of banner

readFromCSVFile

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


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.

hasHeaderbooleanYesSpecifies if the file has header.
charsetstringNoSpecifies the charset used to read that file.

Return type:

string

The text of the file 

 

Example:

string fileContent = readFromCSVFile("C:/test.csv", true);

 

Notes:

  1. You can use absolute paths and relative paths to "sil.home".
  2.  If the file is not found, an error will be raised.

See also:

  • No labels