We may earn an affiliate commission when you visit our partners.
Course image
Conny Soderholm

Requirements

  • Basic Python knowledge - Don't worry, we will cover each code snippet

  • You will need a computer with Python 3 installed, then we will cover how to install OpenPyXL

  • Some form of spreadsheet program. I use Excel, but you can also use OpenOffice or similar applications

Description

Become an Excel Power User - Learn how to control & automate Excel with Python and OpenPyXL

Read more

Requirements

  • Basic Python knowledge - Don't worry, we will cover each code snippet

  • You will need a computer with Python 3 installed, then we will cover how to install OpenPyXL

  • Some form of spreadsheet program. I use Excel, but you can also use OpenOffice or similar applications

Description

Become an Excel Power User - Learn how to control & automate Excel with Python and OpenPyXL

Do you have a bunch of Excel files that you need to format or put some value in a cell on each page? Do you need to create Charts on your spreadsheets or insert formulas? Maybe you just want to show off at the office. Whatever your needs, you can expect a comprehensive guide going through the nuts and bolts of how automating Excel works. The course dives straight into OpenPyXL, so you will be up and running creating and manipulating spreadsheets in no-time.

I have had so much use of OpenPyXL when dealing with spreadsheets. You can create advanced sorts and filters, insert and delete rows, copy cells, set custom formatting and much more. I even got a job based on my OpenPyXL knowledge. I am sure you will benefit from learning OpenPyXL if you have even the slightest interest in making your everyday life easier.

After taking this course you will:

  • Know how to create and manipulate Workbooks and Sheets

  • Read cell data with absolute and relative references

  • Iterate over cells and perform actions on each cell

  • Know how to delete rows and columns

  • Insert formulas and tables

  • Format your spreadsheets with fonts, colors and cell types

  • Understand how you could apply this knowledge to your own work

  • Create files and folders

  • Interact with open and save file dialogs

Whether it's gaming, business, engineering, or data you're passionate about, this course will give you everything you need for working on spreadsheets with Python. Take this course today, and begin your journey to having a full-fledged career as an Excel Power User.

Who this course is for:

  • Anyone interested in controlling and automating Excel with Python - with or without coding experience. People who want to get rid of manually editing hundreds of spreadsheets by hand

  • Especially suitable for those who would like to extract or add data on multiple spreadsheets or automate the creation of spreadsheets from input data

  • People who would like to know more about solving Excel problems with Python

  • People who would like to start consulting services by automating Excel tasks

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Learning objectives

  • Controlling excel with python
  • Automate excel with python
  • How to use openpyxl

Syllabus

Install Python and OpenPyXL, how to read the documentation.
Welcome to the course!
Getting started
Installing OpenPyXL
Read more
Reading the documentation
Be careful with your workbooks, always backup!

This quiz will examine if you understood the Introduction session correctly.

How to create, open and save Workbooks and Sheets
Workbooks and Sheets introduction
Creating Workbooks
Opening Workbooks
Writing and saving to Sheets, Creating and Deleting Sheets
Copying Sheets
Getting sheet by index and name
Workbooks and Sheets Summary

Summary quiz for Workbooks and Sheets

How to read Cell data, and how to use Absolute and Relative referencing
Reading cells introduction
Reading Cells with absolute and relative referencing
Offset
Reading a Range of Cells

Summary quiz for Reading data from Cells.

Looping over cells, using iter_rows and iter_cols with max_row and max_col
Iterating over Cells introduction
Looping over Cells
iter_rows and iter_cols
max_row and max_col

Summary quiz for Iterating over Cells.

How to delete rows and columns, append rows, move and copy ranges, insert formulas and tables.
Manipulating Cells introduction

In this lecture, we are inserting and deleting rows and columns. Note that OpenPyXL has changed from a 0-based index to a 1-based index when inserting and deleting rows. The source code is updated to reflect these changes but the video shows the 0-based index usage.

The append method for rows
Moving and copying Ranges of Cells
Inserting formulas
Tables
Halfway through!

Summary quiz for Manipulating Cells

How to format Cells with Fonts, Colors, and Cell types. How to merge and unmerge Cells, freeze panes and apply Page Setups. How to apply Excel filters and Folds.
Formatting & filtering introduction
Formatting cells, fonts, colors, cell type (date, text etc)

CORRECTION: In the video we are setting the old_cell font to

old_cell.font = Font(name='Arial', size=18, color=colors.RED).

Since then OpenPyXL has updated to not use the colors constants RED, BLUE etc.

Instead we have to write the colors as a HEX value. The code for red is "FF0000" and thus the new line becomes:

old_cell.font = Font(name="Arial", size=18, color="FF0000")

https://www.rapidtables.com/web/color/RGB_Color.html has a picker as well as a table for HEX colors.

Merge and unmerge cells

Learn how to apply autofilter. Sorting cannot currently be done with OpenPyXL. I have attached the file 6.4_resources.py that contains the Win32 library that can apply the sort.

Freeze panes
Page setup
Fold

Summary quiz for Formatting and Filtering.

CHow to create Charts, Chartsheets and insert images.
Visuals introduction
Creating charts
Chartsheets
Inserting Images

Summary quiz for the Visuals section.

How to use file dialogs, create files and folders, open files, time scripts and start up Excel with Python
Useful Python code introduction
Tkinter file dialogs
Creating files and folders
Getting file path and name
Opening multiple files
Timing your scripts
Start Excel for viewing your work
Thanks for taking the course!
Your next steps

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Covers Excel data transformation, useful for business professionals with spreadsheet analysis work
Students should have basic knowledge on Python
Students should have access to Python 3 and OpenPyXL to follow along
Students could apply this knowledge to personal projects to automate their own work

Save this course

Save Control Excel with Python & OpenPyXL to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Control Excel with Python & OpenPyXL with these activities:
Refresh understanding of core Excel concepts to strengthen foundation for automation
Ensure a strong foundation in core Excel concepts to maximize learning in the automation course.
Browse courses on Excel Basics
Show steps
  • Review online tutorials or manuals to refresh understanding of basic Excel functions.
  • Solve practice exercises to reinforce essential Excel skills.
Explore the latest trends in Excel automation with "Excel Power Programming"
Gain insights into the latest Excel automation techniques to enhance your skills and stay current with industry practices.
Show steps
  • Read the book to expand understanding of advanced Excel automation concepts.
  • Apply new techniques learned from the book to existing automation projects.
Collaborate with peers to solve complex Excel automation challenges through discussion and knowledge sharing
Enhance understanding and problem-solving skills by collaborating with peers on challenging Excel automation tasks.
Show steps
  • Identify a complex Excel automation challenge or project.
  • Form or join a peer group with complementary skills.
  • Work together to solve the challenge, sharing ideas and leveraging diverse perspectives.
Six other activities
Expand to see all activities and additional details
Show all nine activities
Master advanced formatting techniques with guided tutorials on conditional formatting and pivot tables
Enhance data presentation and analysis skills by learning advanced formatting techniques through guided tutorials.
Show steps
  • Identify specific formatting issues or areas for improvement in existing spreadsheets.
  • Search for tutorials on advanced conditional formatting and pivot tables.
  • Follow the tutorials to implement advanced formatting techniques.
Enhance problem-solving skills with advanced Excel automation challenges
Strengthen your grasp of spreadsheet automation and problem-solving techniques by tackling advanced Excel challenges.
Show steps
  • Find online resources or join communities offering advanced Excel automation challenges.
  • Solve challenges involving complex data manipulation, formula creation, and VBA integration.
  • Review solutions and discuss approaches with peers to improve understanding.
Expand knowledge and connect with experts at a dedicated Excel automation workshop
Engage with industry professionals, learn from experts, and stay abreast of the latest Excel automation trends and techniques.
Show steps
  • Identify and register for a relevant Excel automation workshop.
  • Actively participate in the workshop sessions and discussions.
  • Connect with speakers and other attendees to exchange ideas.
Automate data extraction from a spreadsheet to enhance work productivity
Build automation skills for common spreadsheet tasks to increase efficiency in data extraction and manipulation at your workplace.
Show steps
  • Identify a repetitive data extraction task in your current workflow.
  • Research online tools and tutorials to automate the task using Python and OpenPyXL.
  • Implement the automation solution for the identified task.
Foster critical thinking and communication skills by creating a blog post on automating Excel tasks
Develop clear and concise technical writing skills while sharing Excel automation knowledge with others.
Show steps
  • Identify a specific topic or problem related to Excel automation.
  • Research and gather information on the topic.
  • Write a blog post that provides valuable insights and solutions.
  • Share the blog post on relevant platforms to reach a wider audience.
Create a portfolio of Excel automation projects to showcase your skills to potential employers or clients
Build a tangible portfolio of projects that demonstrates your proficiency in Excel automation, increasing your credibility and employability.
Show steps
  • Identify a range of projects that showcase diverse Excel automation skills.
  • Develop and implement the projects to solve real-world problems.
  • Document the projects and their outcomes in a professional portfolio format.

Career center

Learners who complete Control Excel with Python & OpenPyXL will develop knowledge and skills that may be useful to these careers:
Spreadsheets Specialist
Spreadsheets Specialists are responsible for the creation and management of spreadsheets that support day-to-day business tasks. This course can help build a foundation for these tasks by teaching how to format and manipulate spreadsheets, including cell manipulation, reading data from cells, and working with formulas. Additionally, it will be helpful to learn how to format spreadsheets to make the data more understandable to end-users.
Spreadsheet Developer
Spreadsheet Developers create spreadsheet applications that support specific operations in a business. This course will help build a foundation for spreadsheet development by teaching how to create, format, and work with spreadsheets using Python and OpenPyXL. This is especially helpful as some organizations have specialized spreadsheet applications that perform custom functions not found in standard spreadsheet programs like Excel.
Data Engineer
Data Engineers design, build, and maintain the systems that collect, store, and process data. They often work with Python to deliver specific functionality. This course will help build a foundation for working with Python, as well as managing and manipulating data. This knowledge may be useful as data is frequently used by Data Engineers.
Data Analyst
Data Analysts use various forms of data to derive insights and meaning. A Data Analyst may collect data manually or through technologies like Python scripts. This course can help build a foundation for writing these scripts, as Python is one of the most popular languages for working with data. Additionally, an understanding of how to manage spreadsheets using Python will allow a Data Analyst to quickly clean and manipulate data for analysis.
SQL Developer
SQL Developers develop, troubleshoot, and maintain the databases that store a company's data. They often work with Python to deliver specific functionality. This course will help build a foundation for working with Python, as well as managing and manipulating data. This knowledge may be useful as data is frequently stored in databases.
Systems Analyst
Systems Analysts use various programming languages, system tools, and software packages to help businesses improve efficiency. Some of these languages include Python, a popular language for automating tasks in spreadsheets. Proficiency in Python scripting can improve one's overall proficiency as a Systems Analyst, as spreadsheets are frequently used in data-related business processes.
Risk Analyst
Risk Analysts use data to help businesses identify and manage risks. This course may be helpful for learning how to work with Python, a very common language in programming. Additionally, it will help build a strong foundation for using Python to manipulate data, construct formulas, and format spreadsheets. This knowledge may be useful as data is frequently used by Risk Analysts.
Business Analyst
Business Analysts use data to help businesses make informed decisions. This course may be helpful for learning how to work with Python, a very common language in programming. Additionally, it will help build a strong foundation for using Python to manipulate data, construct formulas, and format spreadsheets. This knowledge may be useful as data is frequently used by Business Analysts.
Financial Analyst
Financial Analysts use data to help businesses make informed decisions. This course may be helpful for learning how to work with Python, a very common language in programming. Additionally, it will help build a strong foundation for using Python to manipulate data, construct formulas, and format spreadsheets. This knowledge may be useful as data is frequently used by Financial Analysts.
Marketing Analyst
Marketing Analysts use data to help businesses understand their customers and make informed decisions. This course may be helpful for learning how to work with Python, a very common language in programming. Additionally, it will help build a strong foundation for using Python to manipulate data, construct formulas, and format spreadsheets. This knowledge may be useful as data is frequently used by Marketing Analysts.
Data Scientist
Data Scientists use data to help businesses make informed decisions. This course may be helpful for learning how to work with Python, a very common language in programming. Additionally, it will help build a strong foundation for using Python to manipulate data, construct formulas, and format spreadsheets. This knowledge may be useful as data is frequently used by Data Scientists.
Programmer Analyst
Programmer Analysts design, implement, and test computer programs. They work with business stakeholders to identify and define needs, then create programs or systems that meet those needs. This course may be helpful for learning how to work with Python, a very common language in programming. Additionally, it covers topics on data manipulation, formula construction, and formatting, which are all applicable to the work of a Programmer Analyst.
Database Administrator
Database Administrators manage and maintain databases, which store and organize data for various applications. This course may be useful for learning how to work with Python, a very common language in programming. Additionally, it covers topics on data manipulation, formula construction, and formatting, which are all applicable to database management.
Software Engineer
Software Engineers design, develop, test, and maintain software systems. This course may be helpful for learning how to work with Python, a very common language in programming. Additionally, it covers topics on data manipulation, formula construction, and formatting, which are all applicable to the work of a Software Engineer.
Quantitative Analyst
Quantitative Analysts use mathematical and statistical techniques to analyze data and make predictions. This course may be helpful for learning how to work with Python, a very common language in programming. Additionally, it covers topics on data manipulation, formula construction, and formatting, which are all applicable to the work of a Quantitative Analyst.

Reading list

We've selected 17 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Control Excel with Python & OpenPyXL.
Is the second edition of Automate the Boring Stuff with Python. It covers a wide range of new topics, including web scraping, data analysis, and machine learning. It valuable resource for anyone who wants to learn more about Python and how to use it to automate tasks.
Comprehensive guide to data analysis using Python. It covers a wide range of topics, including data cleaning, manipulation, and visualization. It valuable resource for anyone who wants to learn how to use Python for data analysis.
Provides a comprehensive overview of using Python with Excel, covering topics such as reading and writing data, formatting cells, and creating charts. It good resource for those who want to learn more about using Python to automate Excel tasks.
Provides a comprehensive guide to using Python for finance. It covers a wide range of topics, including data analysis, financial modeling, and risk management. It valuable resource for anyone who wants to learn how to use Python for finance.
While this book focuses on VBA, it provides a good overview of the Excel object model, which is also used by Openpyxl. can be helpful for understanding the underlying structure of Excel and how to manipulate it with code.
Provides a comprehensive guide to machine learning using Python. It covers a wide range of topics, including data preparation, model training, and evaluation. It valuable resource for anyone who wants to learn how to use Python for machine learning.
Provides a comprehensive guide to natural language processing using Python. It covers a wide range of topics, including text preprocessing, tokenization, and parsing. It valuable resource for anyone who wants to learn how to use Python for natural language processing.
Provides a comprehensive guide to deep learning using Python. It covers a wide range of topics, including neural networks, convolutional neural networks, and recurrent neural networks. It valuable resource for anyone who wants to learn how to use Python for deep learning.
Provides a comprehensive overview of using Python for data analysis, covering topics such as data cleaning, data manipulation, and data visualization. It good resource for those who want to learn more about using Python for data-related tasks.
Provides a gentle introduction to Python programming, covering topics such as data types, control flow, and functions. It good resource for those who are new to Python and want to learn how to use it for automation tasks.
Provides a comprehensive guide to the Python standard library. It covers a wide range of topics, including the os, sys, and re modules. It valuable resource for anyone who wants to learn how to use the Python standard library.
Provides a comprehensive overview of Excel functions and formulas, covering topics such as basic math functions, statistical functions, and financial functions. It good resource for those who want to learn more about using Excel for data analysis and reporting.
Provides a collection of best practices for writing Python code. It covers a wide range of topics, including code style, testing, and performance. It valuable resource for anyone who wants to learn how to write better Python code.
Provides a comprehensive guide to the Python programming language. It covers a wide range of topics, including the basics of Python syntax and data structures. It valuable resource for anyone who wants to learn how to program in Python.
Provides a concise and comprehensive reference to the Python programming language. It covers a wide range of topics, including the basics of Python syntax and data structures. It valuable resource for anyone who wants to learn how to program in Python.
Provides a concise and comprehensive reference to the Python programming language. It covers a wide range of topics, including the basics of Python syntax and data structures. It valuable resource for anyone who wants to learn how to program in Python.
Provides a humorous and engaging introduction to the Python programming language. It covers a wide range of topics, including the basics of Python syntax and data structures. It valuable resource for anyone who wants to learn how to program in Python in a fun and accessible way.

Share

Help others find this course page by sharing it with your friends and followers:
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser