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

Free Support Forum - aspose.com

Filling empty Pivot table programmatically


I have this format of pivot data which i programmatically generated using C#

Row Labels CRest Cumprod Post-DG1 Post- DG2

CR_Rest 1456

Cumprod 345

Post-DG1 5677

Post- DG2 6788

I want to fill the empty cell programatically with data and get this sample exported to cell. How do i go about it. i can only get to table above.

Row Labels CRest Cumprod Post-DG1 Post- DG2

CR_Rest 1456 1456 1456 1456

Cumprod 345 345 345 345

Post-DG1 5677 5677 5677 5677

Post- DG2 678 678 678 678


I think you may try to input/fill data into the cells (you may use Cells.PutValue() method here) in the source range for the Pivot Table to fill empty cells in Pivot Table report.

Moreover, if you need to export or copy the Pivot Table report, you should try to call the following two methods before exporting or copying Pivot Table:

Hope, this helps you a bit.

Thank you.


Thanks for that quick response,

I can copy the Pivot table to excel from my code, my issue is how do i fill the empty cell with those cells that has value in a row. Please refer to my earlier post of the original pivot display and how i would wnat it to look. i need a sample code for that.



How could you do this in MS Excel, please specify the MS Excel option to automatically fill the blank cells with those values in Pivot Table report instead of manually insert the values into the cells, I am not sure if there is any option in MS Excel to do it automatically. If you know this, kindly give us details and steps involved, also give us your template Excel file with your desired results, we will check it soon.

Tank you.