ObjectToCsv 1.0.0
See the version list below for details.
dotnet add package ObjectToCsv --version 1.0.0
NuGet\Install-Package ObjectToCsv -Version 1.0.0
<PackageReference Include="ObjectToCsv" Version="1.0.0" />
<PackageVersion Include="ObjectToCsv" Version="1.0.0" />
<PackageReference Include="ObjectToCsv" />
paket add ObjectToCsv --version 1.0.0
#r "nuget: ObjectToCsv, 1.0.0"
#:package ObjectToCsv@1.0.0
#addin nuget:?package=ObjectToCsv&version=1.0.0
#tool nuget:?package=ObjectToCsv&version=1.0.0
ObjectToCsv
C# Library: Object List to CSV Converter
Overview
This library provides an easy way to convert a list of objects into a CSV (Comma-Separated Values) file. It's particularly useful when you need to export data from your application to a format that can be easily imported into spreadsheet software or other tools.
Features
- Converts a list of objects (such as a collection of custom classes) into a CSV file.
- Handles escaping special characters (like commas and double quotes) within the data.
- Supports custom delimiters (e.g., semicolon, tab) if needed.
Installation
Using NuGet Package Manager:
- Open your project in Visual Studio.
- Go to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
- Search for "CsvHelper" and install it.
- CsvHelper is a popular library that simplifies reading and writing CSV files in C#.
Manual Installation:
- Download the CsvHelper library from NuGet.
- Add the reference to your project.
Usage Example
Suppose you have a class called Person with properties like Id, Name, Age, and Email. You want to convert a list of Person objects to a CSV file.
- Create a list of
Personobjects:
using ObjectToCsv;
List<TestObject> users = GetTestObjectList();//get list of any object that you want to convert .
var csvString = CsvUtil.BindCsv<TestObject>(users); //call library to get csv string
Contributing
Feel free to contribute to this library by submitting pull requests or reporting issues on the GitHub repository.
License
This library is released under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.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.