EasyCSVReader 1.0.0
See the version list below for details.
dotnet add package EasyCSVReader --version 1.0.0
NuGet\Install-Package EasyCSVReader -Version 1.0.0
<PackageReference Include="EasyCSVReader" Version="1.0.0" />
<PackageVersion Include="EasyCSVReader" Version="1.0.0" />
<PackageReference Include="EasyCSVReader" />
paket add EasyCSVReader --version 1.0.0
#r "nuget: EasyCSVReader, 1.0.0"
#:package EasyCSVReader@1.0.0
#addin nuget:?package=EasyCSVReader&version=1.0.0
#tool nuget:?package=EasyCSVReader&version=1.0.0
EasyCSVReader
EasyCSVReader is a simple C# library for reading CSV files with ease. It provides a simple API to parse CSV data.
How to Use
Install the EasyCSVReader package via the NuGet Package Manager:
Install-Package EasyCSVReaderCreate a Reader instance and set some options if needed:
var reader = new EasyCSVReader(); reader.IgnoreHeaderRows = true; // Ignore the first row as header reader.Delimiter = ';'; // Set custom delimiterRead Rows from a CSV file:
//Read all rows from a CSV file and parse into a list of Row objects List<Row> rows = reader.ReadAllRows("path/to/your/file.csv"); //Access the content with Row.Text property foreach(Row row in rows) { Console.WriteLine(row.Text); }Read Collumns from a CSV file:
//Read all collumns from a CSV file and parse into a list of Collumn objects List<Collumn> collumns = reader.ReadAllCollumns("path/to/your/file.csv"); //Collumns contain a list of Row objects as Collumn.Rows property foreach(Collumn collumn in collumns) { Row newRow = collumn.Rows[0]; Console.WriteLine(newRow.Text); }There is also a Convert function with multiple input overloads:
string testString = "value1"; Row newRow = reader.ConvertStringToRow(test) List<string> testList = new List<string>() { "value1", "value2", "value3" }; List<Row> newRowsFromList = reader.ConvertStringToRow(testList); string[] testArray = new string[] { "value1", "value2", "value3" }; List<Row> newRowsFromArray = reader.ConvertStringToRow(testArray);
I hope someone finds this library useful. Also, no license, so do whatever you want with it. Although Credit is always welcome.
Credit: </br> Idea and Programming - Mocbuilder
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net9.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.