How to extract the information from the Itau return file in C #?

0

I'm developing an application in which the BoletoNet library is being used to generate tickets. In this case the library itself when generating the tickets also generates the shipping file that needs to be sent to the bank.

On the other hand, there is also the return file, which the bank provides with return on operations. I need to process this file and extract the information to save in the program database to be available for the user to see.

The problem is that I do not find much information about this file and how this file can be processed. I even found a PDF of Itau on this, but I could not understand how this can be rendered in C #.

If it was an XML, a CSV, a JSON, that's fine. But it looks like it's just a TXT. I really have no idea how the information is extracted from it.

It seems that BoletoNet has an API for this, but frankly this library is very poorly documented and I have not been able to figure out how it can be used in this case.

In this case, considering that a return file is given to Banco Itau, how can it be processed in C # and have the information extracted from it?

    
asked by anonymous 10.03.2017 / 23:17

1 answer

1

The shipping and return files that banks use are standardized by FEBRABAN and are plain text files, where the documentation for each bank has the file layout.

The layout of the file is basically information telling you which fields there are, where it starts, where it ends, and what the type is.

For example, we have the following information in the Itau documentation:

This means that in the delivery file, the Bank Code field starts at position 1 and ends at position 3, the picture says that it is numeric with 3 positions and the content says that in this case it has to be 341. p>

And so on you will do for each field of documentation.

    
10.03.2017 / 23:42