python openpyxl 获取合并的单元格列表,筛选解除单元格合并
程序员文章站
2022-06-14 09:11:12
...
for i in ws.merged_cell_ranges:
flag_index = False
s = str(i).strip(string.uppercase)
#if ... flag = True
if flag_index:
r1, r2, c1, c2 = i.min_row, i.max_row, i.min_col, i.max_col
ws2.unmerge_cells(start_row = r1, end_row = r2, start_column = c1, end_column = c2)
上一篇: Python处理excel合并单元格
下一篇: Kafka 集群的搭建