'Transfer Dataframe to Excel with Slicer functionality

There is a Dataframe with data pic.1 enter image description here Is it possible using the libraries openpyxl, win32com, etc. to transfer Dataframe to Excel to get the view pic.2, with Excel functionality - Slicer? enter image description here

Not very familiar with VBA!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source