Some columns gets blank in pivot source data

Puneet1220161

New Member
Joined
Jun 23, 2018
Messages
1
I have existing excel (ver 2010) with pivot. This excel is refreshed programmatically from c# application.

The pivot is created with OBDC with sql stored procedure (which returns the sql table after performing some business logic) to pull the data.

When the excel is refreshed programmatically from c# application it gets refreshed without any errors.

When I double click on the total of the pivot table the underlying data is displayed.

This is working fine.

Recently new columns are added in the resultset of the stored procedure.

When the excel is refreshed programmatically from c# application it gets refreshed without any errors.

When I double click on the total of the pivot table the new columns are appearing in the underlying data but now some of the existing columns are appearing completely blank (I have checked by executing the stored procedure, the data is returned properly).

If I manually refresh the pivot (by going to Data->Refresh ALL) it appears. But I want this to happen programmatically (since this columns are existing columns)

I cannot set the "Refresh Data on opening the file" as this file is send to the other users where the dsn will not be there.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Cross-posted here: https://www.excelforum.com/excel-ch...-columns-gets-blank-in-pivot-source-data.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top