

'DeclarationPublic Class Picture Inherits PositionedElement
'UsageDim instance As Picture
public class Picture : PositionedElement
Pictures can be associated with one of three Anchor types : AbsoluteAnchor, OneCellAnchor or TwoCellAnchor.
The type of Anchor used by a Picture can be retrieved with the AnchorType property.
using( var workbook = Workbook.Create( "test.xlsx") ) { // Get the first worksheet. A workbook contains at least 1 worksheet. var worksheet = workbook.Worksheets[ 0 ]; var stream = new FileStream( PictureSampleResourcesDirectory + @"balloon.jpg", FileMode.Open, FileAccess.Read ); // Add the stream picture in cell A4 and extend it to cell E12. var filenamePicture = worksheet.Pictures.Add( stream, "A4", "E12" ); // Add the filename picture with its top left corner in 15th row and 1st column. var streamPicture = worksheet.Pictures.Add( PictureSampleResourcesDirectory + @"balloon.jpg", 14, 0 ); workbook.Save(); }
System.Object
Xceed.Workbooks.NET.WorkbookElement
Xceed.Workbooks.NET.WorksheetElement
Xceed.Workbooks.NET.PositionedElement
Xceed.Workbooks.NET.Picture
| Name | Description | |
|---|---|---|
![]() | AbsolutePosition | Gets/sets the absolute position of the Picture in the Worksheet. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | AnchorPosition | Gets/sets the Anchor's position in the Worksheet. This position is determined by a StartingElement and an EndingElement, which sets a CellRange. For it to work, the CellRange must be located within the same Worksheet as the Picture. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | AnchorType | Gets the Anchor's type. An Anchor can be either an AbsoluteAnchor, a OneCellAnchor or a TwoCellAnchor. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | BottomRightOffsets | Offsets the bottom right corner of a TwoCellAnchor Picture. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | Description | This property contains the description of the picture. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | DrawingClientData | Class property that contains the information of the ClientData, which is how the data should behave when the worksheet is protected. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | Format | Gets the PictureFormat. |
![]() | Height | Gets/sets the height of an AbsoluteAnchor or OneCellAnchor Picture. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | MeasureUnit | Gets/sets the unit used for measuring the Width and Height of the Picture. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | Name | Gets or sets the name of the Picture in the Worksheet. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | PictureLocks | Gets the PictureLocks, which contains the manipulations allowed on the Picture. |
![]() | TopLeftOffsets | Offsets the top right corner of a TwoCellAnchor Picture. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | TwoCellAnchorBehavior | Gets or sets the behavior of the TwoCellAnchor Picture when moving or deleting Rows or Columns. The defaut setting is MoveAndResize. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
![]() | Width | Gets/sets the width of an AbsoluteAnchor or OneCellAnchor Picture. (Inherited from Xceed.Workbooks.NET.PositionedElement) |
| Name | Description | |
|---|---|---|
![]() | GetTypeCode | |
![]() | ToBoolean | |
![]() | ToByte | |
![]() | ToChar | |
![]() | ToDateTime | |
![]() | ToDecimal | |
![]() | ToDouble | |
![]() | ToInt16 | |
![]() | ToInt32 | |
![]() | ToInt64 | |
![]() | ToSByte | |
![]() | ToSingle | |
![]() | ToString | Overloaded. |
![]() | ToType | |
![]() | ToUInt16 | |
![]() | ToUInt32 | |
![]() | ToUInt64 |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.