Pivot Chart loses formatting on auto-refresh

User avatar
Jezza
5StarLounger
Posts: 847
Joined: 24 Jan 2010, 06:35
Location: A Magic Forest in Deepest, Darkest, Kent

Pivot Chart loses formatting on auto-refresh

Post by Jezza »

I have created a stored procedure in my SQL database which appends to a table and refreshes runs every 5 minutes to show session counts.

I have created an Excel front end which creates a Pivot table of the counts and from that a Pivot Chart ( I have done this so that I can use the refesh capability without having to use extra code as it os a one off short term project)

However every time the Pivot Chart refreshes I lose the chart formatting whereby I want the markers to be a 3 pts and circular so as not to crowd the page. Any ideas?
Jerry
I’ll be more enthusiastic about encouraging thinking outside the box when there’s evidence of any thinking going on inside it

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pivot Chart loses formatting on auto-refresh

Post by HansV »

This is a known problem. The chart series aren't updated, but removed and created again, so you can't prevent the formatting from being lost.
Microsoft suggests recording a macro that applies the custom formatting. You could expand it to update the pivot table and to reapply the formatting.

See Changing a PivotChart removes series formatting in Excel.
Best wishes,
Hans

User avatar
Jezza
5StarLounger
Posts: 847
Joined: 24 Jan 2010, 06:35
Location: A Magic Forest in Deepest, Darkest, Kent

Re: Pivot Chart loses formatting on auto-refresh

Post by Jezza »

Thanks Hans, phew I thought it was just me.

That is great information and will save it for later as this is a very temporary project :cheers:
Jerry
I’ll be more enthusiastic about encouraging thinking outside the box when there’s evidence of any thinking going on inside it