A simple .Net library used to format data into comma-separated values (CSV).
- RFC 4180 standard compliant
- UTF-8 encoded.
- Excel compatible.
- Compatible with frameworks: .NET Standard 2.0, .NET Framework 4.0
PM> Install-Package SyntaxSolutions.CsvBuilder
using SyntaxSolutions.CsvBuilder;
var builder = new CsvBuilder();
var headers = new CsvRow();
headers.AddCell("Header 1");
headers.AddCell("Header 2");
headers.AddCell("Header 3");
builder.AddHeaders(headers);
var row = new CsvRow();
row.AddCell("Cell 1");
row.AddCell("Cell 2");
row.AddCell("Cell 3");
builder.AddRow(row);
byte[] fileContents = builder.GetBytes();