Inserting Images into Excel Cells

When doing equipment inspections or area patrols, you collect photos of devices or the site, and sometimes add audio or video as well. The Flagship Edition and above support bulk download of these multimedia files. Once downloaded, you can insert the images into Excel cells in either of two ways:

  • Recommended: use WorkBuddy to let AI match and insert the images automatically
  • Manual: insert images in bulk with VBA

1. Export and Download the Data​

  1. When exporting data, tick the multimedia types you want to download in bulk with it, such as images, recordings, and video, then click "OK".

  2. When the download finishes you get a compressed package. Fully extract it. The extracted folder contains:

    • The form data Excel / CSV file
    • The multimedia folder

Example of the compressed package

The multimedia folder in the package contains images and audio/video. The image, recording, and video columns in the form data Excel / CSV are local links that jump to the matching files when clicked. Download the example below to see the exact folder structure and naming rules.

Equipment inspection data example

Note: When using WorkBuddy, choose the whole fully extracted folder as the workspace. Don't choose only the Excel / CSV file, and don't choose only the multimedia folder.

2. Use WorkBuddy to Let AI Insert Images into Excel Automatically​

If WorkBuddy is already installed on your computer, you can let AI match, compress, and insert the images, so you don't have to handle image paths or write VBA.

If you haven't installed it yet, download WorkBuddy from its website.

Step 1: Choose the Whole Extracted Folder​

Open WorkBuddy and create a new task. Click "Select Workspace" below the input box, then click "Open Local Folder".

Choose the whole fully extracted folder you just downloaded. This folder level should contain both:

  • The form data Excel / CSV file
  • The multimedia folder

Note: Don't open only the Excel / CSV file, and don't choose only the multimedia folder. AI needs to read both the spreadsheet and the images to match them correctly by record number.

Choosing the fully extracted folder in WorkBuddy and sending the prompt

Step 2: Send the Prompt to AI​

After choosing the workspace, copy the prompt below and send it:

Please match the images in the multimedia folder to the subfolders with the same name as the "记录编号" (Record ID) in the Excel file, compress each image to 120 pixels on its long side, and insert each image into its own cell at the far right of the sheet. If a record has several images, add columns horizontally instead of stacking them in one cell. When done, save as a new file.

AI reads the spreadsheet and images in the workspace, then matches and processes them by "记录编号" (Record ID). When it finishes it creates a new file and doesn't overwrite the original.

You Can Adjust the Image Size​

The "120 pixels on the long side" in the prompt can be made larger, for example 300 or 500 pixels. The bigger the image, the clearer it looks in Excel, but the file also gets larger.

After processing, we suggest spot-checking a few records to confirm the images match their record numbers.

3. Insert Images into Excel Manually with VBA​

If you don't use WorkBuddy, you can also insert images in bulk using their local paths and VBA.

3.1 Get the Image Paths​

  1. Download the data package and extract it (any location; this tutorial uses "D drive\folder 1" as the example), then open the extracted form data Excel file. (The example uses WPS; Excel works similarly.)

  2. In Excel, select the image link column (copy this column first, and insert at least 6 blank columns), choose [Data - Text to Columns], and split the image link into parts using "" as the delimiter.

  3. Copy and paste the formula to get the [image local path].

  • Formula: ="D:\folder 1\"&J2&"\"&M2&"_"&N2&"_"&O2&"_1.jpg"
  • Change "D:\folder 1" in the example to where your files are actually stored
  • Adjust the cells to match your Excel file

file

  1. Video tutorial on getting the image paths

3.2 Edit the VBA Code​

Please download the sample code file and only change the bold parts to fit your Excel file.

Sample code file: Click to download

Notes on what to change:

  1. [sheet1]: change to your Excel sheet name

  2. [P]: change to the column that stores the [image local path]

  3. [16]: change to the column number (counting from the left) that stores the [image local path]

  4. [17]: change to the column number (counting from the left) where the images should be inserted

VBA code screenshot

3.3 Insert the Images in Bulk​

  1. Open the Excel file and click [Tools - Developer Tools - VB Editor].

  2. Find your Excel sheet, then click [right-click - Insert - Module].

  3. Copy and paste the edited VBA code and run it.

  • If your WPS doesn't have VBA, see this tutorial to turn it on
  • If clicking [Tools - Developer Tools] in WPS shows the WPS macro editor instead of the VB editor, click [Tools - Developer Tools - Switch to VB Environment] to switch
  • Before inserting images you can adjust the row height and column width of the cells; the images adapt to them once inserted
  1. Video tutorial on running the VBA code