FlatFiles 4.14.0

Reads and writes CSV, fixed-length and other flat file formats with a focus on schema definition, configuration and speed. Supports mapping directly between files and classes.

There is a newer version of this package available.
See the version list below for details.
Install-Package FlatFiles -Version 4.14.0
dotnet add package FlatFiles --version 4.14.0
<PackageReference Include="FlatFiles" Version="4.14.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FlatFiles --version 4.14.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FlatFiles, 4.14.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install FlatFiles as a Cake Addin
#addin nuget:?package=FlatFiles&version=4.14.0

// Install FlatFiles as a Cake Tool
#tool nuget:?package=FlatFiles&version=4.14.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

The behavior of TypedWriter.WriteAll is somewhat unintuitive when called with no records. The expectation is that the header/schema is written when performing this bulk operation; otherwise, the caller has to explicitly call WriteSchema explicitly beforehand. This slightly changes the behavior of the code, such that it might result in headers/schema being written in cases where the file was blank before. However, when IsFirstRecordSchema is true, it is extremely unlikely consumers would expect a blank file to be generated.

During my testing, I also discovered a bug where the schema was getting set, then unset when the header/schema record was the only record in the file. You should be able to try to read the first record of an empty file and get false back, then read the schema via GetSchema; however, my code would throwing an InvalidOperationException or, worse, a NullReferenceException.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on FlatFiles:

Package Downloads
FlatFiles.Mvc
Use FlatFiles to generate MVC ActionResults.
FlatExcelHelper
Flat and Excel file helper to datatable

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
4.16.0 1,021 6/27/2021
4.15.0 1,063 5/11/2021
4.14.0 338 5/2/2021
4.13.0 10,826 12/4/2020
4.12.0 5,128 10/22/2020
4.11.0 1,384 10/9/2020
4.10.0 459 10/7/2020
4.9.0 469 9/26/2020
4.8.0 1,470 9/17/2020
4.7.0 36,353 2/15/2020
4.6.0 33,890 6/4/2019
4.5.0 835 5/30/2019
4.4.0 2,459 5/25/2019
4.3.4 15,532 3/10/2019
4.3.3 15,389 10/15/2018
4.3.2 1,324 10/2/2018
4.3.1.1 970 9/25/2018
4.3.1 926 9/25/2018
4.3.0 5,461 7/17/2018
4.2.0 1,077 7/15/2018
4.1.0 1,034 7/15/2018
4.0.0 1,052 7/15/2018
3.0.1 1,100 7/8/2018
3.0.0 1,037 7/7/2018
3.0.0-rc 1,009 7/5/2018
3.0.0-beta.7 868 7/4/2018
3.0.0-beta.6 823 7/2/2018
3.0.0-beta.5 862 7/1/2018
3.0.0-beta.4 867 7/1/2018
3.0.0-beta.3 878 7/1/2018
3.0.0-beta.2 868 6/30/2018
3.0.0-beta.1 830 6/30/2018
3.0.0-beta 1,011 6/30/2018
2.1.3 1,500 6/17/2018
2.1.2 1,035 6/16/2018
2.1.1 1,760 6/11/2018
2.1.0 1,059 6/5/2018
2.0.0 988 6/5/2018
1.7.1 2,078 4/28/2018
1.7.0 1,050 4/27/2018
1.6.3 1,378 4/18/2018
1.6.2 11,524 11/27/2017
1.6.1 1,583 11/9/2017
1.6.0 1,107 11/6/2017
1.5.0 1,058 11/5/2017
1.4.0 1,076 11/2/2017
1.3.1 1,248 10/31/2017
1.3.0 1,040 10/30/2017
1.2.0 1,044 10/29/2017
1.1.1 1,033 10/28/2017
1.1.0 1,023 10/27/2017
1.0.1 1,032 10/27/2017
1.0.0 1,127 10/26/2017
0.3.26 1,048 10/26/2017
0.3.25 5,493 9/21/2017
0.3.23 19,601 5/25/2017
0.3.22 1,091 5/25/2017
0.3.21 1,064 5/25/2017
0.3.20 1,505 5/1/2017
0.3.19 3,020 7/21/2016
0.3.18 2,359 6/28/2016
0.3.17 1,102 6/28/2016
0.3.16 1,134 6/28/2016
0.3.15 3,969 6/20/2016
0.3.14 1,387 6/15/2016
0.3.13 1,366 6/15/2016
0.3.12 1,389 6/14/2016
0.3.11 1,366 6/13/2016
0.3.10 1,350 6/13/2016
0.3.9 1,360 6/13/2016
0.3.8 1,369 6/10/2016
0.3.7 1,357 6/10/2016
0.3.6 1,371 6/10/2016
0.3.5 1,355 6/10/2016
0.3.4 1,371 6/10/2016
0.3.3 1,371 6/10/2016
0.3.2 1,376 6/10/2016
0.3.1 1,365 6/10/2016
0.3.0 1,395 6/9/2016
0.2.1 1,364 6/9/2016
0.2.0 1,380 5/31/2016
0.1.17 1,452 5/12/2016
0.1.16 1,359 5/12/2016
0.1.15 1,430 5/10/2016
0.1.14 1,898 12/1/2015
0.1.13 1,751 8/20/2015
0.1.12 1,398 8/20/2015
0.1.10 1,990 1/16/2015
0.1.9 2,617 6/28/2014
0.1.8 1,498 2/11/2014
0.1.7 1,245 1/30/2014
0.1.6 1,245 1/30/2014
0.1.5 1,391 1/26/2014
0.1.4 1,234 1/25/2014
0.1.3 1,247 1/25/2014
0.1.2 1,254 1/25/2014
0.1.1 1,239 1/25/2014
0.1.0 1,259 1/24/2014