在Python中,我希望对一组列进行分组,并使其表现得好像excel中data->;outline下的复选框“Summary columns to the Detail Right”将被取消选中。在
以下是我目前掌握的代码:
wb = openpyxl.Workbook()
ws = wb.create_sheet()
ws = wb.active
ws['A1'] = 1
ws['B1'] = 2
ws['C1'] = 3
ws['D1'] = 4
ws['E1'] = 5
ws.column_dimensions.group('B','E')
我已经知道如何对列进行分组,但找不到一种方法来为组提供我需要的行为。在
祝你今天愉快!在
找到了答案。下面这一行解决了这个问题:
相关问题 更多 >
编程相关推荐