I have a refresh Pivot Table - Works
I then have a filter Pivot Table Activity, That works and filters the Pivot Table by Date but Fails with “Filter Pivot Table: Unable to set the Visible property of the PivotItem class”
Anyone seen this before
I have a refresh Pivot Table - Works
I then have a filter Pivot Table Activity, That works and filters the Pivot Table by Date but Fails with “Filter Pivot Table: Unable to set the Visible property of the PivotItem class”
Anyone seen this before
Hi @rmorgan
Yes, this happens when Excel doesn’t allow hiding pivot items. It usually occurs with date fields (grouped) or when the filter hides all items.
Try ungrouping the date field, make sure at least one value stays visible, and ensure the pivot is fully refreshed before filtering.
Hmm
Even recreated the pivot table and there is always a value present. very annoying
This is an Excel limitation. Even when a value exists, date fields (often auto-grouped internally) cause this error.
Try ungrouping the date field, add a delay after refresh, or use Execute Macro as a workaround.
Hi @rmorgan
Just ensure the date exists exactly in the pivot, ungroup the date field, clear existing filters, and apply the filter after the refresh is fully completed.
Or you can also use the vbs macro for this.
If helpful, mark as solution. Happy automation with UiPath
@rmorgan, this happens when the pivot is in a filtered/expanded state; fix it by first clearing all filters (ClearAllFilters) and collapsing the field, then apply the date filter.
Also ensure the pivot is refreshed after the Excel file is fully saved/closed and no cells inside the pivot are selected.