Excel with Python: Working with Excel Spreadsheets from Python

Expected Duration
Lesson Objectives
Course Number
Expertise Level


This 13-video course explores how Microsoft Excel spreadsheets can be created, opened, and modified programmatically from within Python. Learners will review the Microsoft Excel object model, the attributes of the worksheet cell object which can be leveraged to create and modify workbooks programmatically. First, you will review VBA (Visual Basic for Applications) technology, before exploring how Python and its ecosystem of libraries are fast emerging as a popular choice for easy spreadsheet automation. Then you will learn how to use openpyxl (open pixel library) to manipulate Excel's object model programmatically from within Python. Continue by learning how to write spreadsheets by using openpyxl, and examining how existing Excel workbooks can be opened, as well as how new spreadsheet files can be created, and written out to disk. Finally, you will learn how Python iterators and indexing can be used to access and manipulate individual cells, ranges consisting of many cells, as well as entire rows and columns.

Expected Duration (hours)

Lesson Objectives

Excel with Python: Working with Excel Spreadsheets from Python

  • discover the key concepts covered in this course
  • create a Microsoft Excel workbook by choosing from a list of templates
  • create a Microsoft Excel workbook using the openpyxl library
  • access individual cells programmatically using openpyxl
  • access entire rows and columns and manipulate them programmatically
  • save the contents of an in-memory representation to a Microsoft Excel file on disk
  • use lists and other Python containers to read to and write from Excel files
  • specify rows and columns that always ought to be on-screen as a user browses an Excel file
  • filter data in a range based on various attributes
  • sort data in a range using different columns and sort criteria
  • customize the size of rows and columns to enhance readability
  • merge and unmerge groups of cells
  • summarize the key concepts covered in this course
  • Course Number:

    Expertise Level