Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Excel Spreadsheets in Python With openpyxl (Summary)

Congratulations, you now know how to work with Excel spreadsheets in Python!

In the course you have learned how to:

  • Extract valuable information from spreadsheets in a Pythonic manner
  • Create your own spreadsheets, no matter the complexity level
  • Add cool features such as conditional formatting or charts to your spreadsheets

Here are resources for more information about openpyxl:

Download

Sample Code (.zip)

92.3 KB
Download

Course Slides (.pdf)

254.7 KB

00:00 Congratulations. You’ve just learned a ton about how to use openpyxl to use Python to work with Excel workbooks. This course covered a lot of different topics, so let’s take a few minutes to cover what you’ve learned.

00:12 The first thing that you saw was some terminology and did some course setup to get your sample data and your installations. Next, you saw a bunch of different ways to read Excel spreadsheets using openpyxl.

00:23 Then, the focus was on how to write Excel spreadsheets with openpyxl. For reading Excel spreadsheets, you saw how to load a workbook, iterate through the data, and then manipulate the data using Python data structures. For writing Excel spreadsheets, you saw that there were quite a few things that you could do when you were creating these. First, you saw how to manage the rows and columns.

00:46 Then, you saw how to manage the sheets. You then learned how to use openpyxl to add filters and formulas to your worksheets, and then how to style cells while also adding conditional formatting. Finally, you saw how to add images and charts to your worksheets.

01:02 We then wrapped up with a little bonus on how to use pandas with openpyxl. So at this point, you should feel pretty comfortable using openpyxl to work with your Excel spreadsheets.

01:12 You’ve probably seen that there’s a lot of things you can do to Excel spreadsheets with openpyxl, and there’s even more than we covered here.

01:20 Depending on your specific use cases, the openpyxl documentation is a great way to see what you can actually do with openpyxl. And that’s it!

01:29 It’s time to go see how you can use openpyxl in your next project. Thanks for watching.

Ghani on Oct. 31, 2020

Excellent course; thanks a lot!

Ricky Mitchell on Jan. 4, 2021

Great course. Extremely helpful. Now, it is time for me to read the openpyxl documentation to see what all it will do so that I can use it in a cool project. Thank you!

aniketbarphe on Sept. 12, 2021

Great Course!

dakshnavenki on Nov. 17, 2021

Great Explanation of each topic. I am looking for the “Autofit to contents” for each columns, but couldn’t find a direct way to do it in openpyxl. Any leads on this is appreciated. Thank you.

ranjeet on April 6, 2022

Great course with very clear explanation for each and every topic discussed into this tut. Extremely helpful. More to utilize by looking into openpyxl documentation to see what all it will do while working with projects in near future. Thank you so much JOE!

pedroifgonzalez on Feb. 7, 2023

Great course! Thank you!

Become a Member to join the conversation.