Pictures and Shapes
Pictures and shapes sit above the cells of a worksheet as drawings. The drawing collection of each worksheet manages its embedded pictures, shapes and groups, and every object has a document identity, an anchor, dimensions and formatting. Rich content also includes text inside a cell whose runs carry their own emphasis and colors.
Dashboard widgets are separate objects. In version 2.0, they do not include an Image widget.
How Drawings Are Placed
Worksheet.drawings returns the DrawingCollection of a worksheet, the worksheet drawing collection that inserts, finds, groups and removes its drawings.
- Anchors. An Anchor refers to a worksheet cell, with optional offsets in CSS pixels.
- Geometry. Screen zoom does not alter the unscaled geometry.
- Snapshots. The snapshot of a drawing, DrawingHandle.snapshot, is detached. Modify a drawing through the update methods of its handle, such as DrawingHandle.update, rather than editing a returned object and expecting a live change.
Insert Pictures
DrawingCollection.addPicture inserts an embedded picture above the cells. Use a supported PictureSource: bytes, a data URL or base64 with a MIME type, as appropriate. Provide:
- one source representation
- meaningful alternative text
- a worksheet anchor
- unscaled dimensions
Upload validation, network retrieval and authorization belong to the application.
Important
Picture URLs. Do not assume that a URL is fetched automatically wherever a picture source is accepted. Retrieve and validate the bytes in the host, and pass an accepted source.
Check the supported image types and rendering limits with your actual document workflow.
Add Shapes and Groups
DrawingCollection.addShape inserts a shape. Shape options, described by ShapeOptions, control the geometry, text, fill, outline, effects, rotation and placement where supported. Use the exported shape types in SHAPE_TYPES and the drawing reference.
DrawingCollection.group groups drawings of the same worksheet into a DrawingGroup. Grouping supports the common move and size operations. Copying a member can apply to the group according to the documented operation: DrawingHandle.copyTo copies the entire group when the drawing is grouped.
Format a Drawing in the Editor
Select the drawing and open Format Shape or Format Picture. Both dialogs use the shared icon header, fixed settings workspace, live preview and Cancel / OK footer. Changes remain a draft until OK. On desktop, the settings scroll separately from the preview; on narrow screens, the preview follows the settings.
Format Shape provides Size and Properties, Fill, Outline, Effects and Text sections. Opening one closes the previous section. Related controls stay in place and become disabled when their option is off, so enabling a gradient, shadow or text option does not shift the remaining settings.

Format Picture provides Size and Properties for the name, alternative text, dimensions, rotation and flipping. Supply alternative text that describes the purpose of the picture in the report.

Add a Shadow and Rotate a Shape
Select a shape and choose Shape Effects → Shadow to add a shadow, or Glow to add a glow. The editor previews the effect as you rotate the shape with its rotation handle. Releasing the handle commits the rotation as one editing action, which you can undo. These effects are also retained when saving the workbook or exporting a PDF.
With an initialized browser editor named editor, add a sales callout and apply a shadow through DrawingHandle.update. Dimensions, blur and distance are in unscaled CSS pixels; DrawingHandle.rotate takes the absolute angle in degrees.
await editor.ready;
const sheet = editor.workbook.sheets.at(0);
const callout = sheet.drawings.addShape({
type: 'roundRect',
name: 'Quarterly Sales',
anchor: { cell: 'E4' },
size: { width: 260, height: 110 },
text: 'Quarterly sales: $125,000',
fill: '#e7f1ff'
});
callout.update({
shadow: {
color: '#000000',
opacity: 0.3,
blur: 8,
distance: 8,
angle: 45
}
});
callout.rotate(15);
The code inserts a callout anchored to E4, adds a translucent shadow and turns the shape to 15 degrees. Its shadow settings remain editable after the rotation. To remove the shadow, pass { shadow: null } to update.
Format Rich Cell Text
The text runs of a cell, each a CellTextRun, can carry independent emphasis and colors. Preserve the relationship between text and runs during edits, and choose fonts that contain the required glyphs. Wrapping, alignment, rotation and column width all affect the final layout.
Review Imports and Exports
Review imported drawings and exported PDFs, particularly for effects or foreign formats outside the editable feature set.
Next Steps
- Formatting and Number Display: format cells, styles and rich text.
- Charts and Sparklines: add charts that visualize the data of a worksheet.
- Tagged PDF and Accessibility: give pictures alternative text and export accessible PDF.