1from openpyxl.workbook import Workbook
2
3wb = Workbook()
4
5ws1 = wb.create_sheet("Sheet1")
6ws1.title = "Title1"
7ws2 = wb.create_sheet("Sheet2")
8ws2.title = "Title2"
9
10wb.save(filename="filename.xlsx")
1 1from openpyxl.workbook import Workbook
2 2
3 3wb = Workbook()
4 4
5 5ws1 = wb.create_sheet("Sheet_A")
6 6ws1.title = "Title_A"
7 7
8 8ws2 = wb.create_sheet("Sheet_B", 0)
9 9ws2.title = "Title_B"
1010
1111wb.save(filename = 'sample_book.xlsx')