Search code examples
pythonexcelxlsxwriter

Setting Excel outline options using xlsxwriter


There is a table grouped using xlsxwriter, in which, due to the large number of rows, in order to collapse the group, you have to scroll the document .

How can I put a collapse/expand button on the first row of a group using xlsxwriter?

I grouped the rows using this command: worksheet.set_row(row, None, None, {'level': 1}) However, I did not find a suitable parameter in the set_row function arguments to solve the problem

Desired result:


Solution

  • In XlsxWriter you can control this via the worksheet outline_settings() method. In particular set the symbols_below parameter to false.