I've been developing quite a bit at work in the past few months. Mainly writing Python scripts to generate reports. It's been a lot of fun and is a nice change of pace from web development. Being in a Window's environment at work has pushed me outside my comfort zone and has allowed me to learn a lot!
Up until now my programs have mostly outputted to text files. However, the current project I'm working on needs to generate an Excel file with multiple customized "sheets." Then take roughly 25,000 records daily from a Postgres database and kick it into those sheets based on certain criteria.
Not only am I learning a lot when it comes to Python within a Window's environment but I have really been expanding my SQL skills with this project. For instance, my primary query joins seven different tables together as well as performs calculations and formats data on output. In previous jobs I've rarely had to join more than a few tables so this has been a real test to get multiple left and inner joins behaving properly.
So when it came down to working with Excel I chose to use the OpenPyXl module. It has good documentation and after working with it, I'm surprised how easy it is to use. I had to get creative with handling formatting of columns and rows on the fly but in the end it worked out nicely.
I still have some challenging pieces to finish this week but I suspect I'll have it done in no time. I highly recommend those of you working with Python and needing to work with Excel to look into OpenPyXl and give it a try. Feel free to contact me if you choose to use it and have any problems. I have yet to try outputting Charts and Pivot Tables with it but I'm sure it won't be long before I do.
Comsat Angels was an under rated UK "post-punk" band in the 80's. Thanks to one of my favorite movies, Real Genius they got some well-deserved recognition. Here's a couple of samples. After all, you can never go wrong with a montage.
and in case you wanted a little more...
Have some spare cash this year? Would you like to do something nice for a less fortunate individual or family for Christmas? Head on over to USPS Operation Santa and consider adopting an individual or family.
I need to get my hands on a Summer Convention, Limited Edition, Rat Fink by Funko. These turned out awesome and I want one!