Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | readFromCSVFile(path, hasHeader [, charset]) | Package | file | Alias | | Pkg Usage | readCSV(path, hasHeader [, charset]) | |
Description
Excerpt |
---|
|
Reads the values from the CSV file, returning them to an array, of N rows * M columns values. |
...
The basic form will look like this:
Code Block |
---|
string [] fileContent = readFromCSVFile("C:/test.csv", true); |
...
Code Block |
---|
//Suppose we have a CSV file with 3 columns, First Name, Last Name, Age
struct Emp {
string fName;
string
lName;
number age;
}
Emp [] fileContent = readFromCSVFile("C:/test.csv", true);
for(Emp e in fileContent) {
//we can address them now in a better way.... so process row after row
string s = e.fName + " " + e.lName + " / " + e.age;
//do smth with that 's'
} |
...