+ Reply to Thread
Results 1 to 10 of 10

Convert Embedded PowerPoint Chart to Excel

Hybrid View

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    Westlake Village
    MS-Off Ver
    Excel 2010
    Posts
    11

    Convert Embedded PowerPoint Chart to Excel

    Hi there,

    Anyone know of a good way to convert the data from an embedded PowerPoint chart to Excel? I can see the individual data points when hovering over the chart with my mouse, and I can even edit the formatting; so I know the data is there, but for some reason I can't figure out how to get the data back into Excel. Any help would be much appreciated.

    Thanks,
    Daniel

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Convert Embedded PowerPoint Chart to Excel

    select the chart and then use the Edit Data in the Design tab of the Chart Tools contextual menu. You should then be able to copy/paste data from excel sheet
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    03-15-2013
    Location
    Westlake Village
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Convert Embedded PowerPoint Chart to Excel

    Thanks so much, Andy. Unfortunately, I don't have the source file from which the graph was built (kind of an important oversight on my part), so your suggestion yields a pop-up window that says "The linked file is not available. To edit the link, click the File tab. Click the Info tab, and then under Related Documents, click Edit Links to Files." I apologize for leaving out that detail earlier. Any other ideas for how to claw the data out of a graph without having access to the source Excel file?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Convert Embedded PowerPoint Chart to Excel

    Sub X()
    
        Dim shpTemp As Shape
        Dim vntData As Variant
        Dim vntLabels As Variant
        Dim lngSeries As Long
        Dim lngItem As Long
        
        Set shpTemp = ActivePresentation.Slides(1).Shapes(1)
        
        With shpTemp.Chart
            For lngSeries = 1 To .SeriesCollection.Count
                Debug.Print .SeriesCollection(lngSeries).Name
                vntData = .SeriesCollection(lngSeries).Values
                vntLabels = .SeriesCollection(lngSeries).XValues
                
                For lngItem = LBound(vntData) To UBound(vntData)
                    Debug.Print vntLabels(lngItem), vntData(lngItem)
                Next
            Next
        End With
        
    End Sub
    See if this in powerpoint reports information to the immediate window
    update slide and shape references

  5. #5
    Registered User
    Join Date
    03-15-2013
    Location
    Westlake Village
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Convert Embedded PowerPoint Chart to Excel

    Thanks Adam! I ran the macro, but I don't see any sort of output. Would you help me understand the logic behind the code below (looks like I need to go to coding school)?:

    For lngItem = LBound(vntData) To UBound(vntData)
    Debug.Print vntLabels(lngItem), vntData(lngItem)

    Presentation1.zip
    Last edited by deturnbull; 09-17-2013 at 01:58 PM. Reason: Added attachment

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Convert Embedded PowerPoint Chart to Excel

    The information would have appeared in the Immediate window within the VBE. from pointpoint ALT+F11 CTRL+G

    I modified the routine slightly to output to text file because the output was too much for immediate window, which is limited to 255 lines.

    Sub X()
    
        Dim shpTemp As Shape
        Dim vntData As Variant
        Dim vntLabels As Variant
        Dim lngSeries As Long
        Dim lngItem As Long
        Dim intUnit As Integer
        
        intUnit = FreeFile
        Open "C:\temp\data.csv" For Output As intUnit
        
        Set shpTemp = ActivePresentation.Slides(1).Shapes(1)
        
        With shpTemp.Chart
            For lngSeries = 1 To .SeriesCollection.Count
                Write #intUnit, .SeriesCollection(lngSeries).Name
                vntData = .SeriesCollection(lngSeries).Values
                vntLabels = .SeriesCollection(lngSeries).XValues
                
                For lngItem = LBound(vntData) To UBound(vntData)
                    Write #intUnit, , vntLabels(lngItem), vntData(lngItem)
                Next
            Next
        End With
        Close intUnit
    End Sub
    I then opened that file in excel and did some cut/paste to re arrange the data.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-15-2013
    Location
    Westlake Village
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Convert Embedded PowerPoint Chart to Excel

    This is fantastic! Thanks so much, Adam. I really appreciate your help.

    Just in case anyone is as new to VBA as myself...I couldn't get this to work at first, but did the following to get a successful result:

    1. Saved a blank Excel file titled 'Data.csv' to my S drive (probably savable to any drive; but again, I'm not very computer-savvy)
    2. Changed the code that says: "C:\temp\data.csv" to "S:\data.csv"
    3. Ran the macro
    4. Reopened this saved 'Data.csv' file and found all of my data ready to be manipulated.

  8. #8
    Registered User
    Join Date
    03-27-2022
    Location
    newyork
    MS-Off Ver
    11
    Posts
    1

    Re: Convert Embedded PowerPoint Chart to Excel

    This was super helpful. Thanks!

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Convert Embedded PowerPoint Chart to Excel

    whose Adam ???

    Simply changing the path would have done. No need to create a blank file as this will be overwritten rather than updated.

    Open Activepresentation.path & "\data.csv" For Output As intUnit
    this change will output in the same folder as the powerpoint file

  10. #10
    Registered User
    Join Date
    03-15-2013
    Location
    Westlake Village
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Convert Embedded PowerPoint Chart to Excel

    Oh great! Thanks Andy. This will be very helpful.

    Not sure why I started calling you Adam midway through the thread. My apologies!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel chart embedded in powerpoint automatically resizes and distorts
    By BlueDaze in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-23-2021, 03:19 AM
  2. Update embedded excel containing sql in powerpoint
    By DeNam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2013, 08:23 AM
  3. manipulate embedded excel workbook in Powerpoint
    By kayvon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2012, 03:06 PM
  4. Embedded chart in Powerpoint to Excel
    By JWoodrell in forum Excel General
    Replies: 0
    Last Post: 01-20-2012, 02:43 PM
  5. Embedded chart along with DATA to powerpoint
    By Hari Prasadh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2005, 05:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1