Home > Software engineering >  How can I create multiple autofilter using xlsxwriter python package
How can I create multiple autofilter using xlsxwriter python package

Time:03-07

when I write

workbook = xlsxwriter.Workbook( 'text.xlsx' )
worksheet = workbook.add_worksheet()
worksheet.autofilter( A1:A10 )
worksheet.autofilter( B1:B10 ) <- only these apply

the second autofilter cancel the first one

CodePudding user response:

How can I create multiple autofilter using xlsxwriter

It isn't possible to create more than one autofilter per worksheet in Excel. Therefore it isn't possible to do it with XlsxWriter. Only the last autofilter written is applied.

In this particular case the filter ranges are next to each other so they could be combined to make one range, like this:

worksheet.autofilter('A1:B10')
  • Related