FixedWidth.FileParser
1.1.0
dotnet add package FixedWidth.FileParser --version 1.1.0
NuGet\Install-Package FixedWidth.FileParser -Version 1.1.0
<PackageReference Include="FixedWidth.FileParser" Version="1.1.0" />
paket add FixedWidth.FileParser --version 1.1.0
#r "nuget: FixedWidth.FileParser, 1.1.0"
// Install FixedWidth.FileParser as a Cake Addin
#addin nuget:?package=FixedWidth.FileParser&version=1.1.0
// Install FixedWidth.FileParser as a Cake Tool
#tool nuget:?package=FixedWidth.FileParser&version=1.1.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 separated 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 : Single line type delimiter file. Simple pipe '|' separated delimeter File (this could even be comma ',' separated CSV). If no delimiter is configured for the parser then by default a comma separated delimiter or csv is used.
|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: Multi line type delimiter file. The file has a header and footer along with data lines. In this file format, each row has an identifier called as Line head to determine the type of row in the file. Line head is the first value in each row. Default line heads are H, D, F
for header, data and footer lines respectively. These defaults can be overridden in configuration.
|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|
Usage Notes
FixedWidth.FileParser can parse both of the above file formats.
The line heads and delimiter (separator) are configurable as required.
When using the default file provider, you need to configure the provider settings to set the file location
to be searched, the archive policy
and the archived folder
location.
Additionally, You could also provide your custom file provider
implementation to fetch files and override the default provider.
To read more on the parser configuration and code setup, please visit the documentation available on the project repository.
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.