DomHess.com Logo
MINNEAPOLIS BASED APPLICATION DEVELOPER
PYTHON AND EXCEL

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.

Note: I have also read that it works well with OpenOffice and LibreOffice so I will definitely be trying it out within a Linux environment.



PIXEL ART

Pixel



COMSAT ANGELS

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...



OPERATION SANTA

USPS Operation Santa

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.



GUI DEV WITH PYQT5

Qt

I've recently been toying with Qt5. I'm in a position where I am not allowed to show you what I'm working on. So once this all comes together, I'll start making mini apps and explain, as well as show you, exactly what I'm doing. Just give me time. I'm currently out of my element with the tools that I'm using right now. But they're coming together nicely and I'm excited to talk about them on a personal level outside of work.

The project I am working on will use Qt5 for the graphical interface. This way any user who needs to generate this specific report can without having to run the script from a command line. This Python app will utilize PyODBC and OpenPyXl as well as other components within the Standard Library that aren't worth mentioning on the back-end.

The data generated will output to a Microsoft Excel Spreadsheet that will interpret that data and output it to Pivot Tables and Pivot Charts which in return will use Slicers allowing the end user to, in a sense, query the data. Thus, making the output very visual and pleasing to the eye.

I cannot show the output as it contains private data. Once finished, I'll make another post showing the process using some dummy data.



Page: 1  2  3  4  5  6  7