worksheet = workbook.add_worksheet()
cell_format = workbook.add_format({'align': 'center'})
worksheet.merge_range('A1:B1', '')
worksheet.write_rich_string('A1', 'Example', cell_format)
workbook.close()
Horizontal text alignment in openpyxl