Click or drag to resize
ExcelPictureCollectionAdd Method (String, String, String)
Adds a new picture to the worksheet which moves and sizes with cells.

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1033
Syntax
public ExcelPicture Add(
	string picturePath,
	string positionFromCell,
	string positionToCell
)

Parameters

picturePath
Type: SystemString
The picture's path.
positionFromCell
Type: SystemString
The picture's position (top-left corner) (for example, "A1").
positionToCell
Type: SystemString
The picture's end position (bottom-right corner) (for example, "B2").

Return Value

Type: ExcelPicture
A new picture added to the worksheet which moves and sizes with cells.
Remarks

Position.Mode of a newly added picture will be MoveAndSize.

picturePath parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.

See Also