[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FileUtil - C# File Parser for fixed width or delimiter separated files.

License

Notifications You must be signed in to change notification settings

CodeShayk/FileUtil.Core

Repository files navigation

ninja FileUtil.Core v4.0.0

NuGet version License: MIT Master-Build GitHub Release Master-CodeQL .Net 9.0


.Net Library to read from fixed width or delimiter separated file using strongly typed objects.

Fixed Width or Delimiter Separated File

What is Fixed width or Delimiter separated text files?

Fixed width or Delimiter separeted text file is a file that has a specific format which allows for the manipulation of textual information in an organized fashion.
Each row contains one record of information; each record can contain multiple pieces of data fields or columns. The data columns are separated by any character you specify called the delimiter. All rows in the file follow a consistent format and should be with the same number of data columns. Data columns could be empty with no value.

CASE 1 : Simple pipe '|' separated Delimeter File is shown below (this could even be comma ',' separated CSV)

|Mr|Jack Marias|Male|London|Active|||
|Dr|Bony Stringer|Male|New Jersey|Active||Paid|
|Mrs|Mary Ward|Female||Active|||
|Mr|Robert Webb|||Active|||

CASE 2: The above file could have a header and a footer. In which case, each row has an identifier called as Line head to determine the type of row in the file.

|H|Department|Jun 23 2016  7:01PM|
|D||Jack Marias|Male|London|Active|||
|D|Dr|Bony Stringer|Male|New Jersey|Active||Paid|
|D|Mrs|Mary Ward|Female||Active|||
|D|Mr|Robert Webb|||Active|||
|F|4 Records|

FileUtil can be used to parse both of the shown formats above. The line heads and data column delimiters (separators) are configurable as required per use case.

Getting Started?

i. Installation

Install the latest version of FileUtil nuget package with command below.

NuGet\Install-Package FixedWidth.FileParser 

ii. Developer Guide

Please read Developer Guide for details on how to implement FileUtil.Core in your project.

Support

If you are having problems, please let me know by raising a new issue.

License

This project is licensed with the MIT license.

Version History

The main branch is now on .NET 9.0. The following previous versions are available:

Version Release Notes
v4.0.0 Notes
v3.0.0 Notes
v2.0.0 Notes
v1.0.0 Notes

Credits

Thank you for reading. Please fork, explore, contribute and report. Happy Coding !! :)