CSVReadWrite 1.0.0.1
dotnet add package CSVReadWrite --version 1.0.0.1
NuGet\Install-Package CSVReadWrite -Version 1.0.0.1
<PackageReference Include="CSVReadWrite" Version="1.0.0.1" />
<PackageVersion Include="CSVReadWrite" Version="1.0.0.1" />
<PackageReference Include="CSVReadWrite" />
paket add CSVReadWrite --version 1.0.0.1
#r "nuget: CSVReadWrite, 1.0.0.1"
#addin nuget:?package=CSVReadWrite&version=1.0.0.1
#tool nuget:?package=CSVReadWrite&version=1.0.0.1
CSV Read Write
C# Developer find difficulties in writting and reading csv file.
The code here how you can serialize object to CSV and vice versa.
Here are step to Write Object CSV file.
Pre Requisite : CSV file Headings should match to propery of type
To Read CSV File
Step 1: Install Nuget Package using following command
Install-Package CSVReadWrite -Version 1.0.0
Step 2: Create Instance of CSVReader Class
ICSVReader reader = new CSVReader();
Step 3: Call read method ICSVReader, to Read Method you should have following parameter filepath and encoding type.
There two overloaded method one is taking file path other is taking file stream.
reader.Read<Employee>("Filepath", Encoding.UTF8); reader.Read<Employee>(FileStream, Encoding.UTF8);
This Read function will read CSV file and return the list of type.
To Write in CSV File
Step 1: Install Nuget Package using following command
Install-Package CSVReadWrite -Version 1.0.0
Step 2: Create Instance of CSVWritter Class
ICSVWritter writer = new CSVWritter();
Step 3: Call Write method to write List of type in CSV file
writer.Write<Employee>(EmployeeList, "FilePath","Delimeter");
This function Write List of object CSV File on specified location.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has 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.
Version | Downloads | Last updated |
---|---|---|
1.0.0.1 | 911 | 7/16/2019 |