FileHelpers Documentation
repository·master·Indexed 22 days ago
https://github.com/marcosmeli/filehelpersA free .NET library for reading and writing delimited, fixed-length, and Excel files by mapping them to strongly-typed objects. Supports .NET Framework, .NET Standard 2.0, and .NET Core. Includes the FileHelpers.Analyzer for best practices and supports NPOI or Interop implementations for Excel storage.
What's inside FileHelpers
- FileHelpers is a free .NET library designed to read and write data from fixed-length or delimited records. It supports processing data from files, strings, or streams.
Use the Best Practices Analyzer for FileHelpers
masterTheFileHelpers.Analyzerproject provides a Best Practices Analyzer and Quick Fixes for the FileHelpers library. It is designed to identify suboptimal usage patterns—such as using non-generic versions of anEngine—and suggest the recommended, more efficient alternatives to improve your implementation.Use FileHelpers with .NET Standard or .NET Core
masterYou can use FileHelpers in .NET Core or .NET Standard projects via the .NET Standard 2.0 compatible DLL included in the NuGet package (available since version 3.3.0).
Note on Feature Parity: The .NET Standard version is a subset of the full .NET Framework version.
Included features in .NET Standard:
FileHelperEngineMasterDetailEngine- Attributes
- Converters
- Events
ErrorManager- Sorting of big files
Missing features in .NET Standard:
- Dynamic:
ClassBuilderandCsvClassBuilderare not available. - SmartFormatDetector: Not available (depends on
ClassBuilder). - DataLink: Not available.
- Excel Support:
FileHelpers.ExcelNPOIStorageandFileHelpers.ExcelStorageare not supported in .NET Core or .NET Standard.
Install FileHelpers via NuGet
masterYou can install the stable version of FileHelpers from the standard NuGet gallery or use the prerelease feed for continuous integration builds.
Stable NuGet Package:
FileHelpersPrerelease NuGet Feed:
https://ci.appveyor.com/nuget/filehelpersSelect the correct FileHelpers binaries for your project
masterDepending on your requirements for Excel support, you must include specific DLLs in your project. If you are only processing text or XML files and do not require Excel integration, you only need the core libraries.
Core Libraries (Required for non-Excel tasks)
FileHelpers.dll: The main library.FileHelpers.xml: Required if you need access to the documentation.
Excel DataLink Support
If you need to read or write Excel files, choose one of the following implementations:
- NPOI Implementation (Recommended): Uses the NPOI library for a native implementation that does not require Microsoft Excel to be installed.
FileHelpers.ExcelNPOIStorage.dll
- Interop Implementation (Legacy/Not Recommended): Requires Microsoft Excel to be installed on the machine.
FileHelpers.ExcelStorage.dll