Skip to content
REFERENCE

U.INSERT_IMAGE

Summary

Inserts specified image into specified location within worksheet

Syntax

=U.INSERT_IMAGE(image, location, [height], [width], [clear], [settings], [block])

Parameters

Parameter Required Description
image Yes The path to the image that will be inserted, which can be local or a Web URL. All forms of specifying or making an image described in U.MENU are available. Can be a comma-delimited list of images and the first found will be inserted; transparency settings supported in U.MENU are also supported
location Yes The cell or range to which the image will be inserted. Top-left of image will be placed in top-left cell of specified location
[height] No The height in pixels to apply to the inserted image. Native height of image is used if not set, unless width is set in which case height is scaled to preserve native aspect ratio. Set to "fit" (or 0) to set height to height of selected location. Set to a negative number to fit location then shrunk that many pixels. Set to "tile" if location is vertically adjacent to ranges with perfectly fit images.
[width] No The width in pixels to apply to the inserted image. Native width of image is used if not set, unless height is set in which case width is scaled to preserve native aspect ratio. Set to "fit" (or 0) to set width to width of selected location. Set to a negative number to fit location then shrunk that many pixels. Set to "tile" if location is horizontally adjacent to ranges with perfectly fit images.
[clear] No Set to TRUE to always clear any existing image in location. If not set then insert is skipped if location already contains an image. If set to a positive number, the image will be cleared during insert after that many hours has elapsed. Set explicitly to FALSE to overlap existing images with different names
[settings] No Additional settings to be applied to inserted image. Provided as an array of 2 columns with setting name in the left column and setting value in the right column. Alternatively, settings can be provided as a comma-delimited list of settings as =
[block] No If set to TRUE then method will not be calculated unless triggered by user interaction or calculated as a step in a script; If set to a number then will be throttled to not calculate more frequently than the specified number of seconds; make number negative to prevent auto recalc of blocked methods

Behavior

The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.

Return Value

Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.

Examples

=U.INSERT_IMAGE(B8,B10)
=U.INSERT_IMAGE(B24,B26:B28,"fit",0,TRUE,{"brightness",0.65;"rotation",15;"ReflectionSize","60"})

Notes

  • Formula examples are preserved from maintained workbook usage and normalized to the current U. prefix.
  • Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
  • Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
  • For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.