python3 新建excel写入第一行为粗体,并锁定

import openpyxl 
from openpyxl.styles import Font

create_excel = openpyxl.Workbook() #通过Workbook类创建实例,创建一个excel
excel_sheet = create_excel.active  #激活excel,类似鼠标打开excel
excel_sheet.tltle = "sheet_test"   #重命名sheet名字为sheet_test
excel_sheet.freeze_panes = 'A2'    #锁定(固定)第一行
first_row = ['ID','名字','姓名','性别','年龄','身高','爱好'] #写入标题行名称
for i in range(len(first_row)):
      excel_sheet.cell(1,(i+1),first_row[i]).font = Font(name='微软雅黑',bold=True,size=13) #字体加粗,13
create_excel.save('test.xlsx')
create_excel.close()