DataStandardizer.File.CSV
Reading and writing of CSV files compliant with the RFC 4180 standard, with configurable handling of the common real-world variations on that format.
dotnet add package DataStandardizer.File.CSV
Standards
| Standard | What it provides |
|---|---|
| RFC 4180 | Common Format and MIME Type for Comma-Separated Values (CSV) Files — the de facto standard for CSV: comma-delimited fields, CRLF line breaks, and double-quote escaping. |
The reader and writer behave in an RFC 4180–compliant way by default, but every deviation the standard leaves room for in practice — alternative delimiters, line breaks, quoting rules, headers — can be configured.
Platform support
Targets .NET Standard 1.x and 2.0 for use in legacy applications, as well as in-support modern .NET runtimes.
Applies to: the
stringfile-path constructors onCsvFileReader<T>/CsvFileWriter<T>require .NET Standard 2.0 or a .NET Core / modern .NET target; on .NET Standard 1.3 construct the reader/writer from aStreamor aTextReader/TextWriter. Thewith-expression syntax shown in some examples requires .NET 5 or later (CsvFileOptionsis arecordthere and a plainclasson earlier targets).
How-to guides
Concepts
Tutorial
Reference
Table of contents
- Prerequisites
- Configure a reader or writer
- Read CSV files
- Write CSV files
- Map CSV files
- The CSV line model
- Field mapping
- API reference
- CsvContext Class
- CsvExtensions Class
- CsvFieldAttribute Class
- CsvFieldBadValue Delegate
- CsvFieldContext Class
- CsvFieldConvertFromString Delegate
- CsvFieldConvertToString Delegate
- CsvFieldCount Delegate
- CsvFieldGenerate Delegate
- CsvFieldMapping Class
- CsvFieldMappingAttribute Class
- CsvFieldMappingBuilder Class
- CsvFieldQuoteHandling Enum
- CsvFieldValidate Delegate
- CsvFileCustomMapperBase Class
- CsvFileException Class
- CsvFileHeader Delegate
- CsvFileHeaderHandling Enum
- CsvFileHeaderLine Class
- CsvFileIoBase Class
- CsvFileLineBase Class
- CsvFileMapper Class
- CsvFileMapperBase Class
- CsvFileMappingBuilder Class
- CsvFileOptions Class
- CsvFileReader Class
- CsvFileRecordLine Class
- CsvFileWriter Class
- ICsvFileLine Interface
- ICsvFileMapper Interface
- ICsvFileOptions Interface