Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
5. Active worksheet
Summary

Instruction

Great! You can also easily access the active worksheet, i.e. the one that's currently open. When you open an xlsx file, the worksheet you see first is the "active worksheet."

active_ws = wb.active

To get the title of the active worksheet, we can use the title property:

print(active_ws.title)
>> result: sweets

Exercise

Check the active worksheet in the january_diet.xlsx workbook and print its title.