This script is aimed to parse the CEI operations and earnings, in order to import them on my investments track spreadsheet.
Disclaimer: the output generted is tailored to my needs. If for any reason you would like to use this script and the output doesn't fit your needs, just change it. The main functions to change are: read_operations
and read_earnings
.
In order to use this you need to download your statements from cei.b3.com.br in the https://cei.b3.com.br/CEI_Responsivo/extrato-bmfbovespa.aspx page.
Put all downloaded .xls
files in this script's directory. File's names are not important as long as they are .xls
files the script will read all of them.
Install xlrd
dependency with pip:
pip3 install xlrd
After that you can run
python3 parser.py
For me 2 files had formatting issues, thus I had to make this not so pretty fix here. It this isn't required for you, just comment it out.
This project is not actively maintained. I've done as a pet 2h project.