FileHelpers Documentation

repository·master·Indexed 22 days ago

https://github.com/marcosmeli/filehelpers

A 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.

Tokens
585
Snippets
0
Records
5
Agent score
28%

What's inside FileHelpers

  1. Use the Best Practices Analyzer for FileHelpers

    master
    The FileHelpers.Analyzer project 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 an Engine—and suggest the recommended, more efficient alternatives to improve your implementation.
  2. Use FileHelpers with .NET Standard or .NET Core

    master

    You 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:

    • FileHelperEngine
    • MasterDetailEngine
    • Attributes
    • Converters
    • Events
    • ErrorManager
    • Sorting of big files

    Missing features in .NET Standard:

    • Dynamic: ClassBuilder and CsvClassBuilder are not available.
    • SmartFormatDetector: Not available (depends on ClassBuilder).
    • DataLink: Not available.
    • Excel Support: FileHelpers.ExcelNPOIStorage and FileHelpers.ExcelStorage are not supported in .NET Core or .NET Standard.
  3. Install FileHelpers via NuGet

    master

    You can install the stable version of FileHelpers from the standard NuGet gallery or use the prerelease feed for continuous integration builds.

    Stable NuGet Package: FileHelpers

    Prerelease NuGet Feed: https://ci.appveyor.com/nuget/filehelpers

  4. Select the correct FileHelpers binaries for your project

    master

    Depending 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.

    If you need to read or write Excel files, choose one of the following implementations:

    1. NPOI Implementation (Recommended): Uses the NPOI library for a native implementation that does not require Microsoft Excel to be installed.
      • FileHelpers.ExcelNPOIStorage.dll
    2. Interop Implementation (Legacy/Not Recommended): Requires Microsoft Excel to be installed on the machine.
      • FileHelpers.ExcelStorage.dll