xlwt写入excel时候的合并单元格
import xlwt workbook = xlwt.Workbook() worksheet = workbook.add_sheet('My sheet') # 合并第0行的第0列到第3列。 worksheet.write_merge(0, 0, 0, 3, 'First Merge') worksheet.write_merge(1, 2, 0, 3, 'Second Merge', style) worksheet.write_merge(4, 6, 3, 6, 'My merge', style)
#worksheet.write_merge(开始行,结束行, 开始列, 结束列, 'My merge', style)
如果设置颜色,样式,参考: https://www.cnblogs.com/machangwei-8/p/10738244.html