The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
Home MathPack DataTable Methods ImportFromCSV | |||||||||||
See also: ExportAsCSV, TCSVDelimiters, ExportCSV (RLData) | |||||||||||
ImportFromCSV |
|||||||||||
The method ImportFromCSV reads the CSV file (comma separated values file) FName. The parameter Delimiter determines the delimiting character used in the CSV file. Setting the Delimiter to csvUnknown forces the routine to determine the delimiting character automatically by counting the number of occurrences of the possible separator characters. The one with the highest rate of occurrence is considered to be the delimiting character. This approach should work in most of the cases. If not, you can specify a particular delimiting character by setting the Delimiter parameter to the corresponding value. If the parameter IncludeColHeaders is set to TRUE the first row is interpreted as the column headings, if IncludeRowHeaders is set to TRUE the first column of the data array is interpreted as row headings. The function returns a zero value if the CSV file has been read successfully. Version [2] of ImportFromCSV allows to skip the first NLinesSkip lines of the CSV file and to stop at a specific line (parameter LastImportLine). These parameters can be used to import just a part of the CSV file. Set both parameters to zero if you do not want to use this feature. The method ImportFromCSV assigns nominal values automatically whenever a non-numeric cell is read. However, this may result in inconsistencies if numeric and non-numeric cells are mixed within a particular column. Further, you should keep in mind that nominal and ordinal values cannot be distinguished by the import routine, thus the corresponding column is always set to the nominal scale type. The method returns the following error codes: 0 ... everything is OK
|