Updating the DataSheet for a Chart via C#/Automation

S

some guy

Howdy,

I need to access/modify an existing chart's datasheet in via c#.

I am able to iterate over the slides, figure out what chart I am looking at
and update the datasheet. After my work is done, I save the ppt with a new
filename.

-- When I open the new document in PowerPoint, the charts are all updated to
reflect the new data and everything looks fine.
-- If I dbl-click the chart to edit it and get at the datasheet, the
datasheet reflects all of the old data that I just replaced. From the point
on, the datasheet retains the old values and of course the chart is now
updated to reflect these values.

Any hints/suggestions would be greatly appreciated. I thought I was just
about done with this little project - and now this!
 
S

Steve Rindsberg

Howdy,

I need to access/modify an existing chart's datasheet in via c#.

I am able to iterate over the slides, figure out what chart I am looking at
and update the datasheet. After my work is done, I save the ppt with a new
filename.

-- When I open the new document in PowerPoint, the charts are all updated to
reflect the new data and everything looks fine.
-- If I dbl-click the chart to edit it and get at the datasheet, the
datasheet reflects all of the old data that I just replaced. From the point
on, the datasheet retains the old values and of course the chart is now
updated to reflect these values.

Any hints/suggestions would be greatly appreciated. I thought I was just
about done with this little project - and now this!

Before closing the MSGraph application, call its Update method.

One more line of code and you're free to enjoy the weekend. ;-)
 
S

some guy

Steve Rindsberg said:
Before closing the MSGraph application, call its Update method.

One more line of code and you're free to enjoy the weekend. ;-)

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Excellent! You are correct sir. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top