CommonNetFuncs.Csv
4.0.36
See the version list below for details.
dotnet add package CommonNetFuncs.Csv --version 4.0.36
NuGet\Install-Package CommonNetFuncs.Csv -Version 4.0.36
<PackageReference Include="CommonNetFuncs.Csv" Version="4.0.36" />
<PackageVersion Include="CommonNetFuncs.Csv" Version="4.0.36" />
<PackageReference Include="CommonNetFuncs.Csv" />
paket add CommonNetFuncs.Csv --version 4.0.36
#r "nuget: CommonNetFuncs.Csv, 4.0.36"
#:package CommonNetFuncs.Csv@4.0.36
#addin nuget:?package=CommonNetFuncs.Csv&version=4.0.36
#tool nuget:?package=CommonNetFuncs.Csv&version=4.0.36
CommonNetFuncs.Csv
This project contains helper methods for reading and writing CSV files.
Contents
CsvExportHelpers
Helpers for exporting data to a CSV file.
CsvExportHelpers Usage Examples
<details> <summary><h3>Usage Examples</h3></summary>
ExportToCsv
Export data from an IEnumerable or DataTable
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
Person[] testData = [ new() { Name = "Chris", Age = 32 }, new() { Name = "Nick", Age = 43 } ];
await using MemoryStream ms = new();
await testData.ExportToCsv(ms); // ms contains CSV data for testData
</details>
CsvReadHelpers
Helpers for ingesting data from CSV files.
CsvReadHelpers Usage Examples
<details> <summary><h3>Usage Examples</h3></summary>
ReadCsv
Read CSV data directly from a physical CSV file or stream containing its data into a List. CSV data should match the type of T.
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
List<Person> csvPeople = CsvReadHelpers.ReadCsv(@"C:\Documents\People.csv"); // csvPeople contains list of values from People.csv
ReadCsvAsync
Asynchronously read CSV data directly from a physical CSV file or stream containing its data into a List. CSV data should match the type of T.
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
List<Person> csvPeople = await CsvReadHelpers.ReadCsvAsync(@"C:\Documents\People.csv"); // csvPeople contains list of values from People.csv
ReadCsvAsyncEnumerable
Asynchronously read CSV data directly from a physical CSV file or stream containing its data into an IAsyncEnumerable. CSV data should match the type of T.
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
List<Person> result = new();
await foreach (Person record in CsvReadHelpers.ReadCsvAsyncEnumerable<Person>(@"C:\Documents\People.csv"))
{
result.Add(record);
}
// Result contains list of all records within People.csv
ReadCsvToDataTable
Read CSV data directly from a physical CSV file or stream containing its data into a DataTable. DataTable can be constructed with a definite or indefinite type
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
using DataTable dataTable = CsvReadHelpers.ReadCsvToDataTable(@"C:\Documents\People.csv"); // Indeterminate type in People.csv, dataTable contains all records from People.csv with all values as strings
using DataTable dataTable = CsvReadHelpers.ReadCsvToDataTable(@"C:\Documents\People.csv", typeof(Person)); // Known type in People.csv, dataTable contains all records from People.csv with all values typed per Person class
</details>
Installation
Install via NuGet:
dotnet add package CommonNetFuncs.Csv
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CommonNetFuncs.Core (>= 4.0.36)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CommonNetFuncs.Csv:
| Package | Downloads |
|---|---|
|
CommonNetFuncs.Web.Ftp
Helpers for connecting to and working with FTP servers |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.53 | 0 | 5/28/2026 |
| 4.0.43 | 106 | 5/14/2026 |
| 4.0.42 | 113 | 5/11/2026 |
| 4.0.40 | 140 | 5/10/2026 |
| 4.0.39 | 113 | 5/10/2026 |
| 4.0.37 | 121 | 5/9/2026 |
| 4.0.36 | 105 | 5/8/2026 |
| 4.0.31 | 135 | 4/21/2026 |
| 4.0.29 | 116 | 4/20/2026 |
| 4.0.28 | 106 | 4/19/2026 |
| 4.0.25 | 122 | 4/3/2026 |
| 4.0.17 | 124 | 2/23/2026 |
| 4.0.15 | 127 | 2/8/2026 |
| 4.0.14 | 123 | 2/7/2026 |
| 4.0.12 | 121 | 2/3/2026 |
| 3.8.42 | 127 | 3/5/2026 |
| 3.8.38 | 124 | 2/24/2026 |
| 3.8.33 | 133 | 2/2/2026 |