none
Inserting data to a chart in Powerpoint 2007 from excel 2007, chart is not updated RRS feed

  • Question

  • Hi All,

    Im working on a project where Im exporting data from excel 2007(SP3) into existing charts(powerpoint.chart) in powerpoint 2007(SP3). After I have inserted the new data, I do some calculations and depending on how this values turn out I must change the markerstyle and color for the newly added point in each seriescollection. The problem is that even if i insert the data and expand the selection the values are not added in the seriescollection.points so when I try to access the new point i.e Seriescollection(i).Points(ANewPointIndex).MarkerStyle, I get an exception, if I then step it, the seriescollection(i).points.count is updated correctly. I have tried a workaround of creating a sub that raises the exception and continues but this does not update the serie, its only when i step it it seems to update. I have also tried to wait(sleep) for a couple of seconds without success. I have read a couple of posts and there seems to be a variety of different tricks to force update but I have had no success in these.

    Does anyone have any ideas to solve this issue? Any ideas would be very welcome :)


    IM



    • Edited by Ingman Friday, March 8, 2013 10:08 AM
    Friday, March 8, 2013 10:04 AM

Answers

  • Hi,

    Sorry for my late reply, been on vacation :) I still don't know what causes the issue, but its reported frequently with different proposed workarounds. Ive managed to solve this by simple closing the workbook with data and reopening it again, then all data seems to be updated correctly.


    IM

    Tuesday, March 19, 2013 11:56 AM

All replies

  • I think the following MSDN article will help you.

    Inserting Excel Charts into PowerPoint 2007


    Monday, March 11, 2013 8:10 AM
  • Thank you for your answer however I cannot see how this would help me, am I missing something here? My problem is that the SeriesCollection.Points does not update according to my data selection unless i start stepping into the code.

    IM

    Monday, March 11, 2013 10:54 AM
  • How did you inserted the chart into the presentation? Do you have code on that?

    You can post your code for further troubleshooting.

    hth


    with regards, Yuri

    Monday, March 11, 2013 12:20 PM
  • Hi,

    Sorry for my late reply, been on vacation :) I still don't know what causes the issue, but its reported frequently with different proposed workarounds. Ive managed to solve this by simple closing the workbook with data and reopening it again, then all data seems to be updated correctly.


    IM

    Tuesday, March 19, 2013 11:56 AM
  • I am having a similar problem to this. I am using the PresentationBuilder 2.05 to create the presentation from an existing model.  When I modify chart values in the same way as Ingman has described above it appears at first to work, yet the underlying data is not changed.

    I noticed that if you expand a pptx file with a chart into its component parts using the explorer tool in VS 2010 you will see a folder structure underneath the ppt folder containing an "embeddings" folder.

    A .pptx file created by PresentationBuilder will not have this expected structure until the file is opened with PowerPoint and saved with or without changes.

    I am spending way too much time trying to find a solution to this.

    Friday, January 3, 2014 6:54 PM
  • Gerard, do you the same when the PowerPoint Object Model is used? If so, could please provide us with a sample code?
    Friday, January 3, 2014 8:36 PM
  • Eugene,

    Here is a link to PresentationBuilder 2.05 on Codeplex.  It is currently the last item on the list.

    https://powertools.codeplex.com/releases/view/74771

    Load the project and run Program.cs

    Then, in the bin/Debug folder copy Out2.pptx and unpack it (Use the tool in VS 2010 or rename to .zip and open).  You will see that there is no embeddings folder under the ppt folder. You will find the embeddings folder under the Slides/Charts folder and it contains a ".bin" file.

    Then open Out2.pptx in PowerPoint and save it with no changes.

    Unpack the file again and you will see the embeddings folder with the ".xlsx" file.

    My question is, what is this PresentationBuilder project missing in order to have produced a correctly formatted .pptx file the first time even before opening in PowerPoint?

    Friday, January 3, 2014 9:06 PM
  • Hello Gerald,

    I would recommend contacting powertools developers instead. You can open a new thread in the discussions section or use the issues page for adding a new issue.

    Saturday, January 4, 2014 12:09 PM