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

Asked

Viewed 787 times

0

I’m developing an application in which the Boletonet library is being used to generate billets. In this case the library itself when generating the boletos also generates the remittance file that needs to be sent to the bank.

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

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

If it was an XML, a CSV, a JSON, all right. 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 honestly this library is much poorly documented and I haven’t been able to figure out yet how it can be used in this case.

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

1 answer

1

The shipping and return files that the banks use are standardized by FEBRABAN and are simple text files, where in the documentation of each database has the file layout.

The file layout is basically information telling which fields exist, at which position it starts, at which position it ends and what type of data.

For example, we have the following information in the Itau documentation: inserir a descrição da imagem aqui

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

And so on you go doing for every field of documentation.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.