ExcelPictureCollectionAdd Method (MemoryStream, PositioningMode, AnchorCell, AnchorCell, ExcelPictureFormat)

Note: This API is now obsolete.

This method is obsolete. Use Add(MemoryStream, ExcelPictureFormat, AnchorCell, AnchorCell) method and Position and Mode properties instead.

Adds the image with defined anchor properties.

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1018
Syntax
[ObsoleteAttribute("Use 'GemBox.Spreadsheet.ExcelPictureCollection.Add(System.IO.MemoryStream, GemBox.Spreadsheet.ExcelPictureFormat, GemBox.Spreadsheet.AnchorCell, GemBox.Spreadsheet.AnchorCell)' method and 'GemBox.Spreadsheet.ExcelDrawing.Position.Mode' property instead. For more info, see http://www.gemboxsoftware.com/spreadsheet/help/html/Obsolete_Members.htm#ExcelPictureCollectionAdd.")]
public ExcelPicture Add(
	MemoryStream pictureStream,
	PositioningMode positioningMode,
	AnchorCell positionFrom,
	AnchorCell positionTo,
	ExcelPictureFormat pictureFormat
)

Parameters

pictureStream
Type: System.IOMemoryStream
Stream of the image to be added.
positioningMode
Type: GemBox.SpreadsheetPositioningMode
Positioning mode of the image.
positionFrom
Type: GemBox.SpreadsheetAnchorCell
Top left anchor cell.
positionTo
Type: GemBox.SpreadsheetAnchorCell
Bottom right anchor cell.
pictureFormat
Type: GemBox.SpreadsheetExcelPictureFormat
Picture format.

Return Value

Type: ExcelPicture
Newly created ExcelPicture.
Remarks
If column or row offset is greater then that row height or that column width, excel will show image as that offset is set to 0.
See Also