ExcelPictureCollectionAdd Method (String, PositioningMode, AnchorCell, Int32, Int32)

Note: This API is now obsolete.

This method is obsolete. Use Add(String, AnchorCell, Double, Double, LengthUnit) method and Position and Mode properties instead.

Adds the image from specified fileName by using defined top left anchor property and defined width and height.

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 43.0.35.1049
Syntax
[ObsoleteAttribute("Use 'GemBox.Spreadsheet.ExcelPictureCollection.Add(System.String, GemBox.Spreadsheet.AnchorCell, System.Double, System.Double, GemBox.Spreadsheet.LengthUnit)' method and 'GemBox.Spreadsheet.ExcelDrawing.Position.Mode' property instead. For more info, see https://www.gemboxsoftware.com/spreadsheet/help/html/Obsolete_Members.htm#ExcelPictureCollectionAdd8.")]
public ExcelPicture Add(
	string picturePath,
	PositioningMode positioningMode,
	AnchorCell positionFrom,
	int width,
	int height
)

Parameters

picturePath
Type: SystemString
File name of the image to be added.
positioningMode
Type: GemBox.SpreadsheetPositioningMode
Positioning mode of the image.
positionFrom
Type: GemBox.SpreadsheetAnchorCell
Top left anchor cell.
width
Type: SystemInt32
Image width (in pixels).
height
Type: SystemInt32
Image height (in pixels).

Return Value

Type: ExcelPicture
Newly created ExcelPicture.
See Also