How difficult is this series of tasks to do with Python?

Hey, I’m just learning Python but am curious in starting business applications for it right away. For my job I run a bunch of daily auditing reports and I’d like to automate them. Here is what I want to do:

  1. Download data in Excel (.csv) from company website
  2. Paste into another Excel file which contains the report
  3. Create a PDF printout of report
  4. Attach both the Excel file and PDF to an email, then send to a group of people.

Any insight? Thanks in advance!

That might not be possible in pure Python, but Python can definitely do step 2. You probably want to consider VBA if you must use Excel.

RPA Tools should be of great help.

Python is known as being the “swiss army knife” of programming languages. Its simple, but capable. As such Python is very capable for being able to automate tasks in a “system admin” sort of role.

If you wanted to program a Python script, you could build a program using the following for each of your steps:

  1. Downloading data from the internet is well documented.
  2. Updating excel files will probably require a library, like openpyxl
  3. Creating a PDF is supported by multiple libraries (at least according to this SO post)
  4. Sending an email using the email or other lib

Now that is a lot of work, and will require a lot of time to build, debug and maintain. An alternate approach is one talked about in the book Automate the Boring Stuff. Where you simply make Python manage your mouse and inputs for you. This is a little more finicky, but might be easier implement than building an entire program around your tasks.

Goodluck! :smile:

1 Like