none
How to export excel charts as image? RRS feed

  • Question

  • Hi everyone,

    Is it possible to export excel to image, so that I can use them in word. Currently I can just export as PDF.

    Thanks!

    Tuesday, April 2, 2019 1:47 PM

Answers

All replies

  • Try the following (from here)

    Dim co As ChartObject, sht As Worksheet, x As Long
    x = 1
    Set sht = ThisWorkbook.Sheets("Sheet1")
    For Each co In sht.ChartObjects
        Application.Goto co.TopLeftCell, True
        co.Chart.Export "C:\_stuff\test\chart" & x & ".jpg", "JPG", False
        x = x + 1
    Next co


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Tuesday, April 2, 2019 1:58 PM
    Moderator
  • HI Karen,

    Thank you for your reply, please is there any VB.NET example? And actually my chart is a single page chart not a embed chart object in a sheet like below.

    

    • Edited by goldenview Tuesday, April 2, 2019 2:22 PM
    Tuesday, April 2, 2019 2:12 PM
  • Look at the following

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/da1f72a7-28c6-459a-be88-183b11bbc9d4/vbnet-excel-chart-saveexport-to-image?forum=vbgeneral


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Proposed as answer by Alex Li-MSFT Wednesday, April 3, 2019 5:58 AM
    • Marked as answer by goldenview Wednesday, April 3, 2019 12:58 PM
    Tuesday, April 2, 2019 2:52 PM
    Moderator