XlsxWriter icon indicating copy to clipboard operation
XlsxWriter copied to clipboard

feature request: Can you add a slicer when `worksheet.add_table` API

Open epver opened this issue 2 years ago • 1 comments

Feature Request

image

options = {
    "data": data,
    "slicer": [
        {"column": "Column1", "location": "A1"},
        {"column": "Column2", "location": "C1"},
    ]
}

or 

options = {
    'data': data,
    'columns': [
        {'header': 'Product', 'slicer': 'A1'},
        {'header': 'Quarter 1'},
        {'header': 'Quarter 2'},
        {'header': 'Quarter 3'},
        {'header': 'Quarter 4'},
    ]
}
worksheet.add_table('B3:F7', {options})

In this way, you can initially realize the function of the pivot table.

At present, I think the method is to rewrite the Workbook, Worksheet for simple implementation, but I don't know how to add slicer1.xml file

image

epver avatar Nov 11 '22 12:11 epver

I'll look into it since Slicers are a really nice feature. However, it won't happen in the short term.

jmcnamara avatar Nov 17 '22 09:11 jmcnamara