import xlsxwriter
workbook = xlsxwriter.Workbook('outline_collapsed_test.xlsx')
worksheet1 = workbook.add_worksheet('Outlined Rows')
worksheet1.set_row(2, None, None, {'level': 2})
worksheet1.set_row(3, None, None, {'level': 2})
worksheet1.set_row(4, None, None, {'level': 2})
worksheet1.set_row(5, None, None, {'level': 1})
worksheet1.set_row(6, None, None, {'level': 2})
worksheet1.set_row(7, None, None, {'level': 2})
worksheet1.set_row(8, None, None, {'level': 2})
worksheet1.set_row(9, None, None, {'level': 1})
workbook.close()
此代码放置符号' +'在底部。如何将它移到顶部?像这样
答案 0 :(得分:1)
http://msdn.microsoft.com/ru-ru/library/documentformat.openxml.spreadsheet.outlineproperties.aspx
worksheet1.outline_settings(outline_below = 0)