When I’m trying to refresh my pivot table, it takes a lot of time and doesn’t refresh. It gives me this error.
Hi rocktest,
In UiPath, first use Refresh Excel Data Connections inside Use Excel File, wait for the data refresh to complete, and then use Refresh Pivot Table. UiPath documents these activities for refreshing workbook data sources and then updating Pivot Tables.
Also check the failed queries shown in the error, such as AuditReview - GroupByRole, RolePermission, User Detail, Current roles, Role Membership, and User-Username. Make sure their source files/database, credentials, and connections are accessible.
If UiPath activities still fail but Excel’s Data → Refresh All works manually, using UI Automation to trigger Refresh All is a practical workaround reported in the UiPath community.
Thanks
Hi @rocktest,
The error indicates that Excel is unable to refresh one or more data connections used by the workbook’s Data Model. Since multiple queries are failing, I’d suggest checking the underlying data connections first.
You can try:
- Go to Data → Queries & Connections and check if any connection shows an error.
- Open Data → Refresh All and see which query fails.
- Verify the source/database connection and credentials.
- If you’re using Power Query, open the affected queries and refresh them individually to identify the failing one.
- Also check Data → Get Data → Data Source Settings and re-authenticate the connection if required.
Since the error specifically mentions the Data Model, also verify that the affected queries are loading correctly into the Data Model.
It looks like your files data connection issue. It will fail with manual refresh as well. Get the data connections fixed and it should work.
@rocktest This error comes when you open Pivot table excel file to refresh but connection does not retrieve properly, so you can first open excel file and use Refresh Excel Data Connection activity to refresh connection, it will take almost 20 to 30 second to refresh so you can add some delay also for safer side, then you can add Refresh pivot table activity, then it will refresh properly without any error, and at the end of the flow you can use Save Excel file activty.
If it’s helpful, mark it as a solution.
Thanks,
Ankit

