Output Functions

1. imageIf(if_condition, path_true, path_false, type)

Displays an image in a cell (overflowing cell boundaries if necessary).

if_condition:
If non‑zero, path_true is displayed; otherwise path_false.

path_true / path_false:
Image file paths or names.

The list of inserted images can be managed via the Set Cell Background Image toolbar button or the Cell Style Properties dialog.

type: Determines how paths are interpreted.

Images are drawn immediately after formula evaluation is complete.

=imageIf(P251 > 0, "e:\image_file1.png", "e:\image_file2.png", 1)

=imageIf(S10:S120 = 0, "folder1\music_file1.jpg", "image_file2.gif", 0)

2. messageIf(message, type, if_condition, reference-as-text)

Displays a message box with OK and Cancel.

message: Text to display.

type:

if_condition:
Message appears only if the condition evaluates to non‑zero.

reference (as text):
Optional full worksheet path. If provided and you click OK, GS-Calc jumps to the referenced cell/range.

Messages appear immediately after formula evaluation is complete. You can use if_condition = 1 to signal the end of updating.

=messageIf("need to inspect this cell", 1, isError(folder2\sheet2!P251), "folder2\sheet2!P251")

=messageIf("need to inspect this cells", 1, isError(S120), "S121:S200")

3. playSoundIf(path, type, if_condition, loops, volume)

Plays MP3 and WAV files.

path:
File path.

type: Determines how the path is interpreted.

if_condition: File plays only if non‑zero.

loops:
Number of times to play. -1 = endless loop.

volume:
Value from 0 to 1000.

Files play immediately after formula evaluation is complete. Use if_condition = 1 to signal the end of updating.

If multiple files are queued, they play sequentially.

To stop playback, press ESC or use Tools > Cancel Update.

=playSoundIf("e:\music_file1.mp3", 1, true, 1, 40)

=playSoundIf("folder1\music_file1.mp3", 0, true, 100, 80)

4. setFormatIf(reference, action, if_condition, format_true, format_false)

See: Conditional cell formatting