DTAUS with C#   October 28th, 2008

I needed to export Lastschriften (instructions for direct debit) for our german office, and after looking for some solutions, I realised that it is not that hard to write it yourself…

Here is the result: http://download.pokorra.de/coding/Dtaus.cs
Please feel free to use the code any way you like.
I read the input data from an XML file, of course this needs to be modified to your specific situation.

A good help was this documentation of the german DTAUS bank file format:

Another useful tool was the JDTAUS editor, a java editor that can process and create DTAUS files:
I use this to validate and test the files written with my C# program.

Tags: , ,
This entry was posted on Tuesday, October 28th, 2008 at 4:00 pm and is filed under Software Development. You can follow any responses to this entry through the RSS 2.0 feed.Both comments and pings are currently closed.

8 Responses

May 11th, 2009 at 10:41 am
E Says:


I saw in your posted Dtaus.cs file that you use for testing Result78469.tmp as input XML. Would it be a problem if you make that public, also ? Or maybe another example to see how the XML is structured ?


May 12th, 2009 at 9:03 pm
Timotheus Pokorra Says:

Hello Emil,
the xml file is quite simple. I guess you will have your data in some sort of your own format.

I will also upload a fix that is needed because my original version did not cope well with very long references.


sample xml file:

some reference

some reference

June 18th, 2009 at 12:59 pm
Timotheus Pokorra Says:

I have now implemented a parser for SWIFT/MT940 text files as well in C#.
Those files are used for fetching bank statements for a bank account.

I have used the description of the file format from https://www.frankfurter-sparkasse.de/data/50050201/portal/IPSTANDARD/1/content/resources/d09a368d.pdf

You can find the code here:

June 18th, 2009 at 1:15 pm
Timotheus Pokorra Says:

Here are the shorter URLs for my previous comment regarding SWIFT/MT940:

PDF File with format documentation:

source code of Parse
MT940.cs: http://tinyurl.com/m3gbrr

November 21st, 2009 at 7:56 pm
geekscout Says:

Hi Timotheus,

your file just saved me some hours of hard work, I suppose…
I extended and optimised your code and provided the new version in my Blog, maybe you can use the extended version…

July 22nd, 2010 at 11:15 am
TariqSheikh Says:

I not find soure of ur M940 paser on sourec forge

July 22nd, 2010 at 12:11 pm
Timotheus Pokorra Says:

You are right, sourceforge have changed their links.

Here is the working link:
MT940 code

August 29th, 2011 at 6:21 pm
Jorge Says:

Thanks a lot, your code was easy to use and save me lots of hours