-2

How would one apply a filter on an Excel sheet which contains a PivotTable? As part of my requirements, I need to apply filter on a "month" column and select the present month and year from a dropdown list.

esqew
  • 42,425
  • 27
  • 92
  • 132
  • 2
    In order to achieve this functionality, you'll have to develop a custom action and corresponding code stage to extend the default MS Excel VBO. See the "Extending the MS Excel VBO" document on the Blue Prism portal for information on how to create this extension. – esqew Aug 01 '18 at 13:31
  • 1
    It would also be helpful for anyone attempting to answer to see the document that you're working with, and what exactly you're referring to when you mention that you have to select an option from a dropdown. – esqew Aug 01 '18 at 13:34
  • ActiveSheet.PivotTables("PivotTable1").PivotFields("[Time].[Month].[Month]"). _ VisibleItemsList = Array("[Time].[Month].&[2018]&[4]", _ "[Time].[Month].&[2018]&[7]") – ASHISH KUMAR Aug 06 '18 at 07:45
  • this is the macro code i am getting when i record it as macro – ASHISH KUMAR Aug 06 '18 at 07:46

1 Answers1

0

It is possible to navigate the drop-downs and pivot fields in Excel using sendkeys (using the "top" root element/model) to select the filter options you are looking for. Otherwise, you will need to follow the advice above and develop a custom action via a code stage. For a more comprehensive answer, you should provide more detail.

Badda_Bing
  • 640
  • 3
  • 20