Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Converting Charts to GIF Files.

Converting Charts to GIF Files

by Allen Wyatt
(last updated January 16, 2014)

Conrad has an Excel chart that he would like to share with others. He's determined that the best way for him to do this is to share it as a GIF image file. He isn't sure how to create a GIF file from an Excel chart, however.

There are a couple of things you can do to get the file you want. If you only need to create a GIF file once in a while, the best be would be to simply use a graphics program. For instance, you could follow these simple steps:

  1. Start a graphics program such as Paint.
  2. Switch back to Excel and display your chart as you normally would.
  3. Right-click the chart and choose Copy from the resulting Context menu. This copies the chart to the Clipboard.
  4. Switch to the graphics program.
  5. Press Ctrl+V to paste the chart into the graphics program.
  6. Make any changes to the image that you want.
  7. Save the image as a GIF file.

If you prefer, you could modify these steps a bit (well, steps 2 and 3) to capture an entire screen instead of just the chart. This allows you to size the chart any way you want prior to capture, even filling the entire screen, if desired. To capture the screen, just press the PrtScrn button on your keyboard, which places the screen capture in the Clipboard. You can then use steps 4 through 7 to put the screen into Paint and crop it or make other edits you need.

If you need to save your charts as GIF files quite often, then the best solution is to use a macro. The following simple macro saves the currently selected chart as a GIF file in the same directory in which the current workbook is stored.

Sub SaveChartAsGIF()
    Dim sFileName As String
    sFileName = ThisWorkbook.Path & "\" & ActiveChart.Name & ".gif"
    ActiveChart.Export Filename:=sFileName, FilterName:="GIF"
End Sub

The use of the Export method to save out charts is detailed in this Microsoft Knowledgebase article:

http://support.microsoft.com/kb/163103

The article indicates that it is written for Excel 97, but the coding will work just fine with all versions of Excel that use VBA.

If you want a more full-featured macro approach, this article on Jon Peltier's site is quite helpful:

http://peltiertech.com/WordPress/enhanced-export-chart-procedure/

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9302) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Converting Charts to GIF Files.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Text Doesn't Wrap at Margin in Normal View

If you are using Word in Normal view, and the text on the screen doesn't wrap at the right margin like it should, the culprit ...

Discover More

Jumping to the Ends of Table Rows

Need to jump from one end of a table row to another? Word provides a couple of handy shortcuts that can make this type of ...

Discover More

Saving and Closing All Open Documents

Want to close or save all your documents at the same time? This trick does it for you.

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (menu)

Changing Chart Type

Excel allows you to add two distinct types of charts to your workbooks: embedded or chart sheets. You can switch between the ...

Discover More

Dynamic Data Based on Chart Changes

Change the data on which a chart is based and Excel obligingly updates the chart to reflect the change. What if you want to ...

Discover More

Labeling X-Y Scatter Plots

Figuring out how to get the data points in an X-Y scatter plot labeled can be confusing; Excel certainly doesn't make it ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 3?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.