Skip to content

dbamber/Linq.Csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linq.Csv

Install

Install-Package Linq.Csv 

Usage

Add the following using statement which will allow you to use the

using Linq.Csv;

Then you can use any of the following api

With Header

string csvContent = Enumerable.Range(1, 50).Csv(new string[] { "Number" }, p => p);

Without Header

string csvContent = Enumerable.Range(1, 50).Csv(p => p);

To Stream

You can also write directly to the stream.

Stream file = File.OpenWrite("output");
file.WriteCsv(Enumerable.Range(1, 50), p => p, p => p * p);

About

Simple Linq extension method for generating csv data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages