Excel - Listing all image files in a workbook

December 2016

It is possible to list all the jpeg or jpg images within a directory along with creating subdirectories. There are several ways to add images to an Excel spreadsheet. The sheet can be removed providing the initialisation of the host variables with the exact values is done. A comment can also be added with the zoomed object providing correct coding has been set. The type of graphics file is very important here as it may work with jpeg types of files, but may not be appropriate on png images for example.

Here is an application that lists all the *.jpg images in a directory, with the option to include subdirectories.
  • This is the easiest way to incorporate images into a sheet.

  • The display is flexible according to data that has been already compiled in the home sheet.
  • Obviously you can remove the sheet providing you initialise the host variables with appropriate values.
  • Another more elaborate version will be available in a later tutorial, using PictureBox instead of Images, allowing you to capture mouse events.

Download project:

Version 3 initializes the comments with the zoomed images

Related :

This document entitled « Excel - Listing all image files in a workbook » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.