Save Excel Charts as Images (JPG/PNG) – Manual, VBA & C#

2025-05-30 08:17:14 zaki zou

Excel charts are excellent tools for presenting data clearly and effectively. However, when you need to use them outside of Excel — such as in presentations, reports, or websites — it becomes necessary to save Excel charts as images. Exporting a chart to formats like JPG, PNG, or BMP makes it easier to share, reuse, and embed across various platforms. Whether you're preparing business reports, publishing data visualizations online, or building slide decks, converting Excel charts into image files ensures better compatibility and presentation control.

Illustration of saving Excel chart as image using manual, VBA, and C# methods

In this guide, you’ll learn three effective ways to convert Excel charts to image formats like JPG or PNG:

Whether you're looking to do a quick one-off export or batch-process reports with code, this article will help you pick the best approach.


Save a Chart in Excel as an Image (Manual Method)

The simplest method to save chart in Excel as image is to do it manually:

  1. Open the Excel file in Microsoft Excel and select the chart in your Excel worksheet.

  2. Right-click and choose "Save as Picture...".

Right-click context menu on Excel chart showing Save as Picture option

  1. Choose the file format (PNG, JPG, BMP) and save location.

Save As dialog in Excel to export chart as JPG or PNG image

Exported Chart Image:

Result of manually saving Excel chart as PNG image in Excel interface

This method is perfect for quickly turning a chart into a picture for emails or documents. It works in all modern Excel versions and supports various output formats — making it ideal when you want to save an Excel graph as an image without writing any code.

You may also like: Convert Excel Worksheets to Images Online


Convert Excel Chart to Image in C# with Spire.XLS

If you need to automate the export of Excel charts to images, especially in enterprise or reporting systems, using C# with Spire.XLS for .NET is the most scalable solution.

Install Spire.XLS for .NET

Install via NuGet:

PM> Install-Package Spire.XLS

Or use Free Spire.XLS for .NET for smaller tasks:

PM> Install-Package FreeSpire.XLS

C# Sample Code: Save Excel Chart to JPG

using Spire.Xls;
using System.Drawing;

Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");

foreach (Worksheet sheet in workbook.Worksheets)
{
    foreach (Chart chart in sheet.Charts)
    {
        Bitmap chartImage = chart.SaveToImage();
        chartImage.Save($"output/{sheet.Name} - {chart.ChartTitle}.jpg");
    }
}
workbook.Dispose();

Result:

Excel chart exported to image using C# and Spire.XLS with chart.SaveToImage method

This method supports JPG, PNG, BMP, and more. You can control the output by simply changing the file extension in the Save() method — Bitmap will automatically infer the image format based on it.


Save Excel Chart as Image via VBA Macro

If you're working within Excel and want a semi-automated approach, you can use VBA to export charts as images.

How to Insert VBA Code into Excel

  1. Press Alt + F11 to open the Visual Basic for Applications editor.
  2. In the left panel, right-click on VBAProject (YourWorkbookName.xlsm) and choose Insert > Module.

Insert a new VBA module to export Excel chart as image

  1. Paste the macro code below into the module.

Paste VBA code for saving Excel chart as JPG or PNG

  1. Save the file as Excel Macro-Enabled Workbook (.xlsm).

Save the Excel file as Excel Macro-Enabled XLSM file

  1. Press F5 in the the Visual Basic for Applications editor to run, or link it to a button using Excel’s Form Controls.

Run VBA macro to save Excel chart as image from chart object

VBA Macro Code Example

Sub SaveChartAsImage()
    Dim chartObj As ChartObject
    Dim folderPath As String
    Dim savePath As String

    folderPath = ThisWorkbook.Path & "\Charts"
    If Dir(folderPath, vbDirectory) = "" Then MkDir folderPath

    savePath = folderPath & "\MyChart.jpg"
    Set chartObj = ActiveSheet.ChartObjects(1)
    chartObj.Chart.Export Filename:=savePath, FilterName:="JPG"
End Sub

Exported Chart Image:

Exported Excel chart as JPG using VBA macro and chart export function

This macro is ideal for users who frequently work in Excel and need to export charts with minimal effort.


Comparison: Manual vs C# vs VBA Methods

Method Best For Format Support Automation Level
Manual Quick one-time exports PNG, JPG, BMP ❌ None
C# + Spire.XLS Batch, reporting, enterprise use JPG, PNG, BMP, etc ✅ Full
VBA Macro Repetitive tasks in Excel UI JPG, PNG ⚠️ Limited

Which Should You Choose?

  • Use manual saving for occasional image needs.
  • Use VBA if you work heavily inside Excel and prefer macro buttons.
  • Use C# and Spire.XLS if you want full control, automation, and high-quality output.

Conclusion

Saving Excel charts as images is a common need across business, reporting, and data visualization scenarios. This article introduced:

  • How to save Excel chart as image manually
  • How to save Excel chart as image in C# using Spire.XLS
  • How to use Excel VBA to export chart as image

With these methods, you can choose the approach that best fits your workflow and technical skillset.


FAQs

How do I save a chart in Excel as an image manually?

Right-click on the chart, select "Save as Picture...", and choose an image format like PNG or JPG.

How do I save Excel chart as image using code?

Use Spire.XLS with C# and call chart.SaveToImage() to export to image formats like JPG or PNG.

Check out the Spire.XLS for .NET tutorial to learn more about C# techniques for working with Excel charts.

Can I automate saving charts from Excel?

Yes. Use either C# for full automation or VBA macros within Excel for semi-automated workflows.

Does Bitmap in C# support JPG and PNG?

Yes. The Bitmap.Save() method detects the format based on the file extension, supporting formats like JPG, PNG, BMP, and more.

See Also