Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Working with Excel Files
Summary

Instruction

Good job! The workbook is always created with one sheet. If you used sheetnames to list the existing sheet names in an unchanged workbook object:

print(wb.sheetnames)

you would get a list with a single name, Sheet.

However, we can operate on this worksheet and change its name:

ws = wb.active
ws.title = "Calendar"

Here, we simply assigned the title value (in this case, "Calendar") to the title property.

Exercise

We've already imported the Workbook object for you. Create a new workbook and assign it to the wb variable. Then change the title of the only sheet in this workbook to "Monthly budget summary". Save the workbook in the file budget.xlsx.