Pivot Refresh Overlap Issues

Hi Team,

Let’s consider I have two pivot tables on a sheet. The column range for the first table is from A to G, and for the second table, it is from I to O. When I attempt to refresh Table 1, I encounter an overlapping issue with Table 2 since the data expands to column J. I can achieve this through Java with Aspose, but I can’t do it manually. Could you please let me know how it’s handled with Aspose?

@divakar3
You can use the PivotTable.move method to adjust the position of the pivot table, so that there is enough space to place the refreshed pivot table.

Thanks @John.He

Actually the Data is dynamic, how the aspose handling during the refresh internally, without impacting the next pivot table columns?

@divakar3
After refreshing and calculating the pivot table, you can use the PivotTable. getTableRange2() method to obtain the range of the pivot table. If the range occupies the space of other pivot tables, the PivotTable.move method can be called for the move operation.

Thanks @John.He

Actually i never called those methods, i just using only refreshData after that calculateFormula, my question here is, whether refeshData method calling those methods internally?

@divakar3
The refreshData method only collects new data, while calculateData calculates the pivot table based on the new data, including the range and data format of the pivot table.

Thanks @John.He

@divakar3
You are welcome. If you have any questions, please feel free to contact us.

Hi @John.He Greetings,
Suppose while performing CalculateData on a sheet having multiple pivot tables , some pivot overlap issue occurs, how aspose is handling this scenario?

@divakar3,

As we told you have to handle it by yourselves. After refreshing and calculating the pivot table, you may use the PivotTable.getTableRange2() method to obtain the range of the pivot table. If the range occupies the space of other pivot tables, the PivotTable.move method can be called for the move operation. In case, you still find any issue, kindly share a sample (runnable) app (program) and sample Excel file(s) to demonstrate the issue, we will check your issue soon.

PS. please zip the files prior attaching here.