0

I am trying to use asposecells to update a number of pivot tables by updating a single slicer with connections to all pviots. This is an OLAP datasouce.

The slicer in question has month start date as the values to select from. enter image description here

My goal is to update this slicer to the last month date, but when I run the below code trying to access the indiviual values of the slicer (the month start dates), I am getting an empty list. Can someone explain why I am getting an empty list with a slicer that has values in workbook and show me the correct syntax to get the list output?

My code is as follows:

import jpype
import asposecells
import os

jpype.startJVM()
from asposecells.api import Workbook, SaveFormat

workbook = Workbook("Test.xlsx")

worksheet = workbook.getWorksheets().get(0)

slicer = worksheet.getSlicers().get(0)

print(slicer.getSlicerCache().getSlicerCacheItems())

for item in slicer.getSlicerCache().getSlicerCacheItems():
    print(item)

jpype.shutdownJVM()
Soufiane Hassou
  • 17,257
  • 2
  • 39
  • 75
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 21 '23 at 12:39

0 Answers0