jsisie 2.5.0

dotnet add package jsisie --version 2.5.0
NuGet\Install-Package jsisie -Version 2.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="jsisie" Version="2.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add jsisie --version 2.5.0
#r "nuget: jsisie, 2.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install jsisie as a Cake Addin
#addin nuget:?package=jsisie&version=2.5.0

// Install jsisie as a Cake Tool
#tool nuget:?package=jsisie&version=2.5.0

jsisie

A .NET parser for SIE files that can read files of version 1 to 4 (including 4i)

Follow this link for swedish versions and this link for english versions of the SIE specifications.

Read a SIE file

To read a file create an instance of SieDocument and call ReadDocument.

There are some properties on SieDocument that changes how the parsing works:

  • AllowUnbalancedVoucher: If true the parser will allow vouchers that do not sum to zero.
  • IgnoreMissingOMFATTNING: If true the parser will not flag a missing #OMFATTN as an error.
  • IgnoreBTRANS: If true #BTRANS (removed voucher rows) will be ignored.
  • IgnoreRTRANS: If true #RTRANS (added voucher rows) will be ignored.
  • AllowMissingDate: If true some errors for missing dates will be ignored. (same as IgnoreMissingDate)
  • StreamValues: If true don't store values internally. The user has to use the Callback class to get the values. Usefull for large files.
  • ThrowErrors: If false then cache all Exceptions in SieDocument.ValidationExceptions
  • DateFormat: The standard says yyyyMMdd and parser will default to that, but you can change the format to whatever you want.
  • Encoding: The standard says codepage 437, but that is not supported by dotnet core. You can change it to whatever you want. It will default to codepage 437 when running in Dotnet Framework and 28591 (ISO-8859-1) when running dotnet core. Please note that #KSUMMA will not be caclutated if you choose a multibyte encoding.

Not all features are implemented yet:

  • #UNDERDIM: There are no instances of this in the published example files.

Write a SIE file

To write a file create an instance of SieDocumentWriter and call WriteDocument The WriteOptions class contains properties to set DateFormat and Encoding.

Compare SIE files

To compare SIE files call the static method Compare on SieDocumentComparer. It will return a List<string> with differences between the files.

Even if you use this parser you should get familiar with the file specification. I have not made any extensive efforts to validate the resulting data against the files so please do your validation and tell me if you find any errors.

To install this package via nuget write

Install-Package jsisie

in the nuget console in Visual Studio

Java

There's a Java version of this parser here: https://github.com/perNyfelt/SIEParser

Change log

  • 2023-03-02 Added AllowUnbalancedVoucher
  • 2021-07-10 Add all test files I got from the SIE organisation. And make the test program use them.
  • 2021-07-10 Fix bug that wrote #TRANS instead of #BTRANS and #RTRANS
  • 2021-07-10 Add DateFormat, Encoding and IgnoreMIssingDate. Use ISO-8859-1 on dotnet core.
  • 2020-07-05 Now supports writing KSUMMA
  • 2017-12-22 Add #PROGRAM to the document comparer. Enable the test program to compare two files via command line.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last updated
2.5.0 1,251 3/2/2024
2.4.0 79,011 7/10/2021
2.3.3 2,006 11/22/2020
2.3.2 420 11/19/2020
2.3.1 434 11/19/2020
2.3.0 436 11/19/2020
2.2.0 1,485 1/24/2018
2.1.0 1,064 1/23/2018
2.0.0 3,971 5/13/2015
1.0.5550.14426 1,124 3/13/2015
1.0.5528.35570 1,435 2/19/2015