We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to get updated category or value range from pivot chart on deleting rows from pivot data source?

I am reading the pivot chart data. The issue is when I delete some rows from pivot table data source and get the pivot table category or value range from chart I get the previous/same range i.e. before deleting the rows from pivot source. How can I get the updated range of pivot from chart category or value range?

@Amjad_Sahi

Can you please help me with this?

@vbAspose,

I think you would need to call refreshData() and calculateData() for pivot table after deleting rows before using it as source for the pivot chart. Similarly you may call refreshPivotData() and calculate() for chart before accessing the chart data. In case, you still find any issue, kindly provide sample (runnable) Java program or code with sample file(s) to reproduce the issue on our end, we will check it soon.

PS. please zip the Excel files prior attaching.

I tried as you mentioned but it does not give me exact range. e.g if the body range in pivot table is of 3 rows it only give me last two rows.

@vbAspose,

Could you please provide sample (runnable) Java program or code with sample resource file(s) to reproduce the issue on our end, we will check it soon.

@Amjad_Sahi

It’s working fine now. I have made some changes.
If still issue persist, will share the sample of code.

Thank you

@vbAspose,

Good to know that your issue is sorted out now. If you find any issue or have other queries, feel free to write us back.