[Answered] Auto update of Excel Charts

This thread is solved
Hello,
I have excel charts in excel which are copied to an powerpoint file.

How i can update the excel charts in power point file when i open it without manual update of each chart. Is there any possibility?

Regards,
Faisal
 
Hello,
I have excel charts in excel which are copied to an powerpoint file.

How i can update the excel charts in power point file when i open it without manual update of each chart. Is there any possibility?

Regards,
Faisal
Hi Faisal,

You can link Excel charts to a PowerPoint presentation so that they update automatically when you open the PowerPoint file.

Follow these steps to do so:
  1. Copy the Chart from Excel
  2. Open your PowerPoint presentation.
  3. Go to the slide where you want to insert the chart.
  4. Right-click and choose Paste Special.
  5. In the Paste Special dialog box, select Paste Link, choose Microsoft Excel Chart Object, and click OK.

Paste as Link.png

The chart in PowerPoint is now linked to the Excel file. When you update the data in Excel, the chart will also be updated in PowerPoint.

If the Excel file is updated, PowerPoint will prompt you a dialog box then select Update Links to update the chart automatically.

Auto Update Links.png

Make sure that the Excel file remains in the same location; otherwise, PowerPoint won’t be able to locate and update the charts.

This method ensures your charts in PowerPoint are always in sync with your Excel data without the need for manual updates each time.
 
You are most welcome. Keep exploring Excel with ExcelDemy. Be an active member to help each other.
 
Dear,

There is any issue in the link file that if you move the link file away then Excel chart in PPT file will not be updated. Is there any way by macro or vb that i just run the program and it updated the associated charts in PPT file instead of manually updating each time.

regards,
Faisal
 
Hello Faisal,

In this case, you can use the VBA code to auto-update your PPT file if the linked Excel file is moved.

It will loop through each slide in your PPT and update all linked charts automatically. You won't need to update them manually, even if the linked Excel file has been moved.

Code:
Sub UpdatePPTCharts()
    Dim pptApp As Object
    Dim pptPres As Object
    Dim pptSlide As Object
    Dim pptShape As Object
    
    ' Create PowerPoint Application object
    Set pptApp = CreateObject("PowerPoint.Application")
    
    ' Open the PowerPoint file
    Set pptPres = pptApp.Presentations.Open("C:\Path\To\Your\Presentation.pptx")
    
    ' Loop through each slide and each shape in the slide
    For Each pptSlide In pptPres.Slides
        For Each pptShape In pptSlide.Shapes
            ' Check if the shape is a linked chart
            If pptShape.Type = msoLinkedOLEObject Then
                ' Update the chart
                pptShape.LinkFormat.Update
            End If
        Next pptShape
    Next pptSlide
    
    ' Save and close the presentation
    pptPres.Save
    pptPres.Close
    
    ' Quit PowerPoint application
    pptApp.Quit
    
    ' Clean up
    Set pptShape = Nothing
    Set pptSlide = Nothing
    Set pptPres = Nothing
    Set pptApp = Nothing
    
    MsgBox "All charts updated successfully!"
End Sub

Remember to replace "C:\Path\To\Your\Presentation.pptx" with the actual path to your PowerPoint file.
 

Online statistics

Members online
0
Guests online
3
Total visitors
3

Forum statistics

Threads
355
Messages
1,556
Members
662
Latest member
Pendyala Vignesh
Back
Top