CsvFile Type
Represents a CSV file. The lines are read on demand from reader.
Columns are delimited by one of the chars passed by separators (defaults to just ,), and
to escape the separator chars, the quote character will be used (defaults to ").
If hasHeaders is true (the default), the first line read by reader will not be considered part of data.
If ignoreErrors is true (the default is false), rows with a different number of columns from the header row
(or the first row if headers are not present) will be ignored.
The first skipRows lines will be skipped.
Instance members
| Instance member |
Description
|
|
Returns a csv with the same rows as the original plus the provided rows appended
|
|
Returns a new csv with the same rows as the original but which guarantees that each row will be only be read and parsed from the input at most once.
|
|
|
Full Usage:
this.GetColumnIndex
Parameters:
string
Returns: int
|
Returns the index of the column with the given name
|
Full Usage:
this.Headers
Returns: string[] option
|
The names of the columns
|
Full Usage:
this.NumberOfColumns
Returns: int
|
The number of columns
|
Full Usage:
this.Quote
Returns: char
|
The quotation mark use for surrounding values containing separator chars
|
Full Usage:
this.Rows
Returns: 'RowType seq
|
The rows with data
|
Full Usage:
this.Save
Parameters:
string
?separator : char
?quote : char
|
Saves CSV to the specified file
|
Saves CSV to the specified stream
|
|
|
Saves CSV to the specified writer
|
Full Usage:
this.SaveToString
Parameters:
char
?quote : char
Returns: string
|
Saves CSV to a string
|
Full Usage:
this.Separators
Returns: string
|
The character(s) used as column separator(s)
|
Returns a csv that skips N rows and then yields the remaining rows.
|
|
|
|
Returns a new csv with only the first N rows of the underlying csv.
|
|
|
|
|
|
Full Usage:
this.TryGetColumnIndex
Parameters:
string
Returns: int option
|
Returns the index of the column with the given name, or returns None if no column is found
|
Static members
| Static member |
Description
|
Full Usage:
CsvFile.Load(reader, ?separators, ?quote, ?hasHeaders, ?ignoreErrors, ?skipRows)
Parameters:
TextReader
?separators : string
?quote : char
?hasHeaders : bool
?ignoreErrors : bool
?skipRows : int
Returns: CsvFile
|
Loads CSV from the specified reader
|
Full Usage:
CsvFile.Parse(text, ?separators, ?quote, ?hasHeaders, ?ignoreErrors, ?skipRows)
Parameters:
string
?separators : string
?quote : char
?hasHeaders : bool
?ignoreErrors : bool
?skipRows : int
Returns: CsvFile
|
Parses the specified CSV content
|
FSharp.Data