I've an excel workbook having a single sheet in it. That sheet contains only the pivot table.
In the pivot table there is one column having category details and one column with the counts. On the counts column on each cell if I double click or select "Show Details" option another sheet is generated automatically.
My requirement is, if a cell value matches a given count I need to read the generated sheet (manually done by double click on that cell to generate the sheet).
For example: Consider the below table as a pivot table. Suppose I'm given with the value 8 to match. So I've to double click on the cell having value 8 in count column which generates a sheet with the details(rows that contribute to get count value 8).
Is there any way I can generate and read the excel programmatically (may it be as pandas dataframe or worksheet in openpyxl or in any other form so that I can automate the process).
| Category | Count |
|---|---|
| ABC | 5 |
| OPQ | 8 |
| XYZ | 10 |
I'm working with pivot tables for the 1st time, so forgive and correct me if my question is misunderstood.



