0

Im trying for hours to find out how to enable clearing the filter with xlsxwriter in a protected sheet. Microsoft says that it won't work, but there are macros in VBA which are allowing it to do. Since we are in python I wanted to ask if someone knows how to do it with the xlsxwriter.

Thanks in advance.

My settings.

if protect_sheet:
    worksheet.protect(
        options={
            "objects": False,
            "scenarios": False,
            "format_cells": True,
            "format_columns": True,
            "format_rows": False,
            "insert_columns": False,
            "insert_rows": False,
            "insert_hyperlinks": True,
            "delete_columns": False,
            "delete_rows": False,
            "select_locked_cells": True,
            "sort": True,
            "autofilter": True,
            "pivot_tables": False,
            "select_unlocked_cells": True,
        })
Andre Nevares
  • 711
  • 6
  • 21
CodeoDE
  • 93
  • 6
  • If Microsoft say it isn't possible, and there isn't an option to do this in Excel, then it is unlikely that it can be done via XlsxWriter. – jmcnamara Aug 04 '22 at 10:48
  • I think there is an error on the last comma. If so change ```"select_unlocked_cells": True,``` for ```"select_unlocked_cells": True``` without comma. – Andre Nevares Aug 04 '22 at 18:30

0 Answers0