Easy Way to Pull Images Out of Excel at Full Resolution

As you probably know, Excel does not have a native image-exporting feature, so it requires a separate process to create a high resolution, standalone Excel chart. Many people create standalone graphs by taking screenshots of their Excel window, but screenshots can look blurry and pixelated, especially next to text that surrounds it. The screenshot solution doesn't always work because the quality of the screenshot depends on the resolution of the monitor.

Source: Example of a blurry set of images. Future Directions for the Demography of Aging

I think there is a better way to obtain high-quality images out of Excel and have tested a number of different ways to do so. I can summarize these methods into five main categories:

  1. Take a screenshot. Mac screenshots are going to be better than those taken on PCs because of the inherent better resolution of Mac screens. The other big problem with screenshots is that image size may vary depending on exactly where the user places their cursor. I did not test third-party tools like Camtasia or Screencast-o-matic in this exercise, but consistent image sizes will be an issue whenever you need to manually select the area of the screen to capture.
  2. Use PowerPoint. Copy the graph from Excel, paste into PowerPoint, and export. If the user wants the Excel graph to be a specific size, then the PPT slide could be set at those dimensions. On PCs, there are two ways to get the slide/image out of PowerPoint: First, use the standard SaveAs command. Second, right-click on the graph and SaveAs a Picture. I find that this second method creates more higher-quality images. (Only the first method works on Macs though).
  3. Use VBA code. It is possible to build an image exporting engine in Excel (like this one from Jon Peltier) using VBA code (on PCs only). I've tested that approach and the quality of the final images is still not that high, likely because the image resolution still depends on the resolution of the screen.
  4. Save as a PDF. Save the graph (made in either Excel or PowerPoint) as a PDF file (through the SaveAs or Print menus), crop in Adobe, and then save as an image. Because they are vector images, PDFs tend to have the best resolution, but to get a standalone image you still need to export it from Adobe as an image file. I tested a few options here, but image quality wasn't sufficiently high enough to warrant the multiple steps necessary to create the image.
  5. Use Preview (Macs only). On Macs, the user can copy the graph from Excel (CMD+C), open the Preview tool and create a new document (CMD+N). This will load the copied graph from Excel directly into Preview. In Preview, select Save and change the file format to PNG. In the save window, you can change the DPI to 300 pixels (or whatever you like). Of all the methods I tested, this provided the highest quality image.
  6. UPDATE (7/23/2020): Francis Gagnon pointed out that Mac users can simply right-click on the image in Excel and select the Save As Picture option. From this menu, you can save the image as a PNG, GIF, BMP, PDF, or JPG. This approach does work, but I think the Preview option gives a slightly higher resolution.

To conduct these tests, I used a graph on my Macbook Pro and my Asus (PC) laptop for testing, both running Office 365. In addition to grading the quality of the images subjectively, I also documented the image size and image dimensions (in pixels), which helps give a more objective measure of image quality. You can find the results of my tests in the table below and download the raw images and original Excel file in this zip file.

Summary table of image quality

Of course, size matters here. If you need thumbnail images, the loss of resolution in any of these methods probably won't matter. But if you want a large image, the method may have a big impact on the image resolution. If you look carefully, you can see the differences in clarity between these two images (especially the Source line).

Using Excel-to-Preview on the Mac
Using a standard screenshot on a PC

Zooming into the titles of these images and taking a screenshot makes the comparison ever clearer.

Zoom into titles of different image resolutions demonstrates the issue.

For reports–in many cases, created by writing text in Microsoft Word and pasting graphs made in Excel–the same procedures work, but you don't need to worry about creating a standalone image. In these cases, you could paste the Excel graph into Word (or PowerPoint) directly, but that will often carry the entire workbook with it, which I dislike for file size and security issues. You could also just simply paste as a picture (in the Paste Special menu)–I recommend Enhanced Metafiles for PC users and the PDF option for Mac users.

Paste Special menu on the Mac

To create standalone images, my recommendations are as follows:

  • PC users. Copy the graph in Excel (CTRL+C) and paste into PowerPoint as a Microsoft Excel object. (The PPT slide size should be set to match the size of the graph using theSlide Sizeoption in theDesigntab). From there, right-click on the slide, select "Save as Picture", and then use the PNG file format option.
  • Mac users. Copy the graph in Excel (CMD+C), open a new file in Preview (CMD+N), and save as a PNG image (changing the resolution to 300 DPI). This ensures consistent image size and the image quality in Preview can be set to 300 pixels/inch.

These recommendations have three major advantages:

  1. The images are of high quality and same file type (PNG)
  2. The images will be the same size
  3. The steps are relatively simple

This challenge of creating high quality Excel graphs as a challenge for many users. I don't claim that my findings are the correct or only answer, but I think they offer a viable path to create high-resolution Excel graphs. If you have a preferred method or solution that you think would work better, please let me know.

reesecastand.blogspot.com

Source: https://policyviz.com/2020/07/21/high-resolution-excel-images/

0 Response to "Easy Way to Pull Images Out of Excel at Full Resolution"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel