Hi,
I have 5 sheets in a workbook containing pivot table.
I am adding data in one of it and after adding it I need to refresh all the pivots in all the sheets.
Can anyone suggest how to do it?
Note:- I won’t be able to share the worksheet
Thanks in advance!!
Hi @mkankatala
But there are pivots in every sheet and I need a code to refresh the complete sheet at once.
Thanks!!
We can use refresh pivot activity to refresh all pivots at once as well ,…Excel.AllPivotTables
This will ensure all tables are refreshed
Hope this helps
cheers
Hi @Anil_G
I have ties this method but after refreshing the data is automatically getting deleted.
Data deletion is not part of this anyway…please check the flow and the data being provided
Cheers
Hi @Anil_G
No actually the data is getting deleted from pivot table means after refreshing it.
Then mostly then updated datasource is not proper…can you check the datasource once please
are you by any chance changing the datasource…becasue refresh will only refresh the data but not the datasource underlying it…if that is changed then we need to use change data source instead
cheers
Hi @Anil_G
Yes I am deleting the previously present data and adding the new data into the sheet.
Thanks!!
May be that is causing the issue…instead of delete and readd try to overwrite …as it might be changing the pivot data source…to check try checking the pivot datasource and see if it is changing
Cheers
Hi @Anil_G
Overwriting the data is helping me, but it is not completely giving me the solution.
Because in the previously present in the sheet there are records present say: 101 records are present with header.
And I have to paste new 70 records, so there are excess 30 records present in the end which is from the previously present data.
So how to resolve this issue?
Thanks in advance!!
Instead of delete rows…use clear data and check if that helps
else other way would be after pasting new data delete the old one
cheers
Hi @Anil_G
How to delete the data after pasting the new one?
- Count the number of rows that exists…then paste the data…
- Now get the difference between old row count and new row count
- Now use delete rows …with the row number as nee row count + 1
Cheers
Hi @Anil_G ,
can you please share one xaml file for deleting the data after pasting the new one.
It will be really helpful.
Thanks.
Hi @Anil_G
Can you help me with a xaml or code please.
It would be really helpful because I am a bit confused on how to delete extra rows if exist.
Thanks in advance!!
Hi @Anil_G
The process you shared seems to be different from an example image you shared.
Can you please share the same xaml please?
Thanks in advance.