IXlPicture.SetOneCellAnchor(XlAnchorPoint, Int32, Int32) Method
Anchors an IXlPicture object to a specific cell in a worksheet.
Namespace: DevExpress.Export.Xl
Assembly: DevExpress.Printing.v18.2.Core.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
topLeft | XlAnchorPoint | An XlAnchorPoint object that specifies the anchor cell for the top-left corner of the picture and optional offsets from the top and left edges of this cell. |
width | Int32 | A Int32 value that is the desired width of the picture in pixels. |
height | Int32 | A Int32 value that is the desired height of the picture in pixels. |
Remarks
Use the SetOneCellAnchor method to specify the start position for a picture in a worksheet. The top-left corner of the picture will be anchored to a specific cell whose position in a worksheet is defined by the XlAnchorPoint object. This object specifies the column and row containing the anchor cell and allows you to define possible offsets within this cell to move the picture away from the top-left corner of the anchor cell. The IXlPicture.AnchorType for the inserted picture will be set to XlAnchorType.OneCell. The picture will move with the anchor cell, but its size will remain the same.
For more information on how to add a picture to a worksheet and specify its location, refer to the How to: Insert and Position a Picture in a Worksheet example.