Jacob J. Walker's Blog

Scholarly Thoughts, Research, and Journalism for Informal Peer Review

Archive for January 24th, 2015

Some Python “Best Practices”

without comments

As I have said before, I don’t believe their are truly “best practices”, sometimes there are “best known practices”, or “best known practices for a given context”.    But, there are often times when it is clear something is a bad practice.  And through the school of hard knocks, I’ve learned from attempting some practices that I thought were good, but turned out to be bad.  So here is what I have learned.

Read the rest of this entry »

Written by Jacob Walker

January 24th, 2015 at 7:50 pm

Posted in Python

Python Script to Automate Refreshing an Excel Spreadsheet

with 3 comments

Often I run into situations where it makes sense to do analysis of a lot of database data in an Excel spreadsheet, but due to the amount of processing the spreadsheet requires when updating, it takes a long time for the spreadsheet to “Refresh All”.

One solution to this problem is to automate the spreadsheet so it refreshes every night.  The following is a small Python script that can do this using the Python for Windows Extension:

Read the rest of this entry »

Written by Jacob Walker

January 24th, 2015 at 9:42 am