2.2.3.18 insertImg

Menu Information

Right-click context menu of worksheet cell: Insert Images from Files

Brief Information

Insert image(s) into worksheet cell(s)

Command Line Usage

1. insertimg fname:=c:\pepper.bmp;

2. insertimg fname:=c:\car.bmp orng:=[Book1]Sheet1!col(1)[2];

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
File Name fname

Input

string

<unassigned>
Specifies the image(s) to be inserted. In the dialog, you can click the browse button on the right to select the image. When multiple images are selected, one image for one workshee cell.
Resize Cell resizecell

Input

int

0
Specifies whether or not to resize the worksheet cell to fit the embedded or linked image.
Insert Direction dir

Input

int

0
When multiple images are selected, this option decides the preferred direction to insert the images.

Options list:

  • hori:Horizontal First(0)
insert images by column.
  • vert:Vertical First(1)
insert images by row.
UG insert image direction horizontal.png
Cell orng

Output

Range

<active>
Specifies the worksheet cell where the first image will be inserted. Other images, if any, will be inserted into the cells to its right or below determined by dir.

See the syntax here.

Description

This X-Function inserts images from files into worksheet cells. When you double-click on the cell that has an inserted image, the image will be opened in a separated image window. Once opened, the image can be processed by the a bunch of images processing tools.

Related X-Functions

insertGraph, insertNotes, insertSparklines, insertArrow, insertVar