Microsoft KB Archive/47142

From BetaArchive Wiki

Article ID: 47142

Article Last Modified on 11/16/2006


  • Microsoft Excel 95 Standard Edition
  • Microsoft Excel 5.0 Standard Edition
  • Microsoft Excel 4.0 Standard Edition
  • Microsoft Excel 3.0 Standard Edition
  • Microsoft Excel 2.10d
  • Microsoft Excel 2.1 Standard Edition
  • Microsoft Excel 2.01
  • Microsoft Excel 2.0 Standard Edition

This article was previously published under Q47142


To export Microsoft Excel graphics in the HPGL (Hewlett-Packard Graphics Language) format, print the graphic to a file using the HP Plotter driver. The file can be read directly by another application such as Ventura Publisher, WordPerfect, Word, PageMaker, and so on.


To export a Microsoft Excel graphic in the HPGL format, you must first have a driver installed that supports an HP plotter and configure it to print directly to a file instead of your normal printer port. To accomplish this, use the appropriate procedure below.

If You Are Running Microsoft Excel Under Windows 95

  1. Click the Start button, and then click Settings.
  2. Click the Control Panel icon.
  3. In the Control Panel window, click Printers.
  4. Click the Add Printer icon, and follow the steps in the Add Printer Wizard to install and configure the HP ColorPro plotter driver to print to a file.

If You Are Running Microsoft Excel Under Windows 3.0 or 3.1

  1. Start Windows Control Panel.
  2. Double-click the Printers icon.
  3. Select Add Printer, choose the HP ColorPro plotter from the list of printers, and select Install.
  4. Select Configure. From the list of ports, choose FILE: and choose OK.
  5. Select Active and choose OK.
  6. Close the Control Panel Window.

If You Are Running Microsoft Excel Under an Earlier or Run-Time Version of Windows

  1. Open the WIN.INI file (located in the \WINDOWS directory) into a text editor such as Notepad.
  2. Find the section labeled "[Ports]" in this file. Add a line under this section that reads


  1. Save this file, exit, and restart Windows.
  2. Run the Windows Control Panel. From the Installation menu, Add New Printer, and install for an HP plotter.
  3. From the Setup menu, choose Connections. In the list of printers, select the plotter. In the list of ports, select OUTPUT.HGL.
  4. Exit Control Panel.

Now when you want to create an HPGL file in Microsoft Excel, choose Printer Setup from the File menu, choose the HP Plotter and select OK. If you choose Print from the File menu, Excel will first respond with the normal printing dialog boxes, followed by a prompt for a filename if running under Windows 3.0 or 3.1. Respond with a filename that has an .HGL extension. If you are not running under Windows 3.0 or 3.1, Microsoft Excel will print to the file called OUTPUT.HGL that you added to your WIN.INI file.

Note: Because Windows versions prior to 3.0 will always plot to the same file, OUTPUT.HGL in this case, be sure to copy this file under another name before plotting to it again or you will lose your previous data.

These .HGL files can then be imported into Word for Windows using the Insert Picture command, or into PowerPoint using the File Paste From command. These graphics can then be scaled and cropped normally in both applications.

When preparing to create HPGL files for importing into other applications, keep the following items in mind:

  1. The output from Excel depends heavily on which plotter you have configured for under Printer Setup. You may want to experiment with selecting different plotters to see how it affects your imported graphics.
  2. Related to the type of plotter selected is the type of fonts you are using. For consistent results, format text using a printer font.


"Microsoft Windows User's Guide," version 3.0, pages 210-211
"Microsoft Windows User's Guide," version 2.0, page 213

Keywords: KB47142