Ninjasoft.Csv
3.0.0
dotnet add package Ninjasoft.Csv --version 3.0.0
NuGet\Install-Package Ninjasoft.Csv -Version 3.0.0
<PackageReference Include="Ninjasoft.Csv" Version="3.0.0" />
<PackageVersion Include="Ninjasoft.Csv" Version="3.0.0" />
<PackageReference Include="Ninjasoft.Csv" />
paket add Ninjasoft.Csv --version 3.0.0
#r "nuget: Ninjasoft.Csv, 3.0.0"
#:package Ninjasoft.Csv@3.0.0
#addin nuget:?package=Ninjasoft.Csv&version=3.0.0
#tool nuget:?package=Ninjasoft.Csv&version=3.0.0
Ninjasoft.Csv
Reading
Example data class. Note the columns are zero based.
using Ninjasoft.Csv;
public class Item
{
[Column(2)]
public string Description {get;set;}
[Column(0)]
public int Id {get;set;}
[Column(1)]
public string Name {get;set;}
}
Example 1
string filePath = "/data/items.csv";
foreach(Item item in CsvReader.Read<Item>(filePath))
{
//... do stuff
}
Example 2
string filePath = "/data/items.csv";
CsvReaderOptions options = new() {RowsToSkip = 1};
foreach(Item item in CsvReader.Read<Item>(filePath, options))
{
//... do stuff
}
Options
RowsToSkip - Default is 0; How many rows should be skipped at the beginning. You may want to do this if you have a header row Delimiter - Default is ",". Currently there is only support for a single charater. We hope to support strings in future versions ContainsQuotes - Default is false. Enable this if your file uses quotes to denote strings. ie. 1,"Something","Another thing" TreatQuotedNullAsNull - Default is false. Enable this if your file has the string null and you want to treat it as a null value when parsing.
Writing
Not supported in this version
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
CsvReader is now static. Updated to read and parse faster.