CsvHelper
Feature-rich CSV library with class maps, culture-aware parsing and mature read/write APIs.
Decision Guide
CSV pipelines often fail at edge cases: quoting, delimiters, encodings, and malformed rows. Choose a library based on how strict your input contracts are, then design explicit validation and observability around parsing errors.
The decision to make
Which CSV library best fits import/export workloads in .NET applications?
Curated starting points to compare. Always evaluate suitability against your specific project requirements.
Feature-rich CSV library with class maps, culture-aware parsing and mature read/write APIs.
High-performance CSV reader/writer optimized for streaming and low-allocation data access.
Strongly-typed CSV serialization/deserialization with compile-time focused mapping patterns.
Write a versioned import contract: encoding, delimiter, quote behavior, required headers, locale, maximum file size, and error-reporting policy. Do not infer these rules from a single sample file.
Stream rows where possible and validate each value before it reaches persistence. Return row and column references for recoverable errors while preserving a safe audit trail.
Generate exports from explicit DTOs and fixed column maps. Test output against representative spreadsheet software and re-import it in automated tests when round-trip behavior matters.
Risk
Checklist
Revisit CSV package choices when file sizes increase materially, new locales are added, or partner data quality introduces recurring parse anomalies.