Click or drag to resize
ExcelPictureCollectionAdd Method (String, Double, Double, Double, Double, LengthUnit)
Adds a new picture to the worksheet which doesn't move nor sizes with cells.

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 39.3.30.1189
Syntax
public ExcelPicture Add(
	string picturePath,
	double left,
	double top,
	double width,
	double height,
	LengthUnit unit
)

Parameters

picturePath
Type: SystemString
The picture's path.
left
Type: SystemDouble
The distance of the left edge of the picture from the left edge of the worksheet.
top
Type: SystemDouble
The distance of the top edge of the picture from the top edge of the worksheet.
width
Type: SystemDouble
The picture's width.
height
Type: SystemDouble
The picture's height.
unit
Type: GemBox.SpreadsheetLengthUnit
The length unit in which all length parameters are specified.

Return Value

Type: ExcelPicture
A new picture added to the worksheet which doesn't move nor sizes with cells.
Remarks

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

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

See Also