ExcelPictureCollection Class
Represents a collection of ExcelPictures in the worksheet.
public sealed class ExcelPictureCollection : ExcelDrawingCollection<ExcelPicture>, IList<ExcelPicture>, ICollection<ExcelPicture>, IEnumerable<ExcelPicture>, IEnumerable
Public NotInheritable Class ExcelPictureCollection
Inherits ExcelDrawingCollection(Of ExcelPicture)
Implements IList(Of ExcelPicture), ICollection(Of ExcelPicture), IEnumerable(Of ExcelPicture), IEnumerable
- Inheritance:
- System.ObjectExcelPictureCollection
Implements
Methods
Add(MemoryStream, ExcelPictureFormat, AnchorCell, AnchorCell)
Adds a new picture to the worksheet which moves and sizes with cells.
public ExcelPicture Add(MemoryStream pictureStream, ExcelPictureFormat pictureFormat, AnchorCell positionFrom, AnchorCell positionTo)
Public Function Add(pictureStream As MemoryStream, pictureFormat As ExcelPictureFormat, positionFrom As AnchorCell, positionTo As AnchorCell) As ExcelPicture
Parameters
pictureStream
- System.IO.MemoryStream
The picture's stream.
pictureFormat
- ExcelPictureFormat
The picture's format.
positionFrom
- AnchorCell
The picture's position (top-left corner).
positionTo
- AnchorCell
The picture's end position (bottom-right corner).
Returns
A new picture added to the worksheet which moves and sizes with cells.
Remarks
Position.Mode of a newly added picture will be MoveAndSize.
Add(MemoryStream, ExcelPictureFormat, AnchorCell, Double, Double, LengthUnit)
Adds a new picture to the worksheet which moves but doesn't size with cells.
public ExcelPicture Add(MemoryStream pictureStream, ExcelPictureFormat pictureFormat, AnchorCell positionFrom, double width, double height, LengthUnit unit)
Public Function Add(pictureStream As MemoryStream, pictureFormat As ExcelPictureFormat, positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As ExcelPicture
Parameters
pictureStream
- System.IO.MemoryStream
The picture's stream.
pictureFormat
- ExcelPictureFormat
The picture's format.
positionFrom
- AnchorCell
The picture's position.
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Add(MemoryStream, ExcelPictureFormat, Double, Double, Double, Double, LengthUnit)
Adds a new picture to the worksheet which doesn't move nor sizes with cells.
public ExcelPicture Add(MemoryStream pictureStream, ExcelPictureFormat pictureFormat, double left, double top, double width, double height, LengthUnit unit)
Public Function Add(pictureStream As MemoryStream, pictureFormat As ExcelPictureFormat, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As ExcelPicture
Parameters
pictureStream
- System.IO.MemoryStream
The picture's stream.
pictureFormat
- ExcelPictureFormat
The picture's format.
left
- System.Double
The distance of the left edge of the picture from the left edge of the worksheet.
top
- System.Double
The distance of the top edge of the picture from the top edge of the worksheet.
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
Returns
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.
Add(MemoryStream, ExcelPictureFormat, String, Double, Double, LengthUnit)
Adds a new picture to the worksheet which moves but doesn't size with cells.
public ExcelPicture Add(MemoryStream pictureStream, ExcelPictureFormat pictureFormat, string positionFromCell, double width, double height, LengthUnit unit)
Public Function Add(pictureStream As MemoryStream, pictureFormat As ExcelPictureFormat, positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As ExcelPicture
Parameters
pictureStream
- System.IO.MemoryStream
The picture's stream.
pictureFormat
- ExcelPictureFormat
The picture's format.
positionFromCell
- System.String
The picture's position (for example, "A1").
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Add(MemoryStream, ExcelPictureFormat, String, String)
Adds a new picture to the worksheet which moves and sizes with cells.
public ExcelPicture Add(MemoryStream pictureStream, ExcelPictureFormat pictureFormat, string positionFromCell, string positionToCell)
Public Function Add(pictureStream As MemoryStream, pictureFormat As ExcelPictureFormat, positionFromCell As String, positionToCell As String) As ExcelPicture
Parameters
pictureStream
- System.IO.MemoryStream
The picture's stream.
pictureFormat
- ExcelPictureFormat
The picture's format.
positionFromCell
- System.String
The picture's position (top-left corner) (for example, "A1").
positionToCell
- System.String
The picture's end position (bottom-right corner) (for example, "B2").
Returns
A new picture added to the worksheet which moves and sizes with cells.
Remarks
Position.Mode of a newly added picture will be MoveAndSize.
Add(String, AnchorCell)
Adds a new picture to the worksheet which moves but doesn't size with cells. Picture size will be determined by decoding the image data.
public ExcelPicture Add(string picturePath, AnchorCell positionFrom)
Public Function Add(picturePath As String, positionFrom As AnchorCell) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFrom
- AnchorCell
The picture's position.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Position.Mode of a newly added picture will be Move.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
This method decodes image data to determine picture's size.
Add(String, AnchorCell, AnchorCell)
Adds a new picture to the worksheet which moves and sizes with cells.
public ExcelPicture Add(string picturePath, AnchorCell positionFrom, AnchorCell positionTo)
Public Function Add(picturePath As String, positionFrom As AnchorCell, positionTo As AnchorCell) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFrom
- AnchorCell
The picture's position (top-left corner).
positionTo
- AnchorCell
The picture's end position (bottom-right corner).
Returns
A new picture added to the worksheet which moves and sizes with cells.
Remarks
Position.Mode of a newly added picture will be MoveAndSize.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
Add(String, AnchorCell, AnchorCell, ExcelObjectSourceType)
Adds a new picture to the worksheet which moves and sizes with cells.
public ExcelPicture Add(string picturePath, AnchorCell positionFrom, AnchorCell positionTo, ExcelObjectSourceType sourceType)
Public Function Add(picturePath As String, positionFrom As AnchorCell, positionTo As AnchorCell, sourceType As ExcelObjectSourceType) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFrom
- AnchorCell
The picture's position (top-left corner).
positionTo
- AnchorCell
The picture's end position (bottom-right corner).
sourceType
- ExcelObjectSourceType
the picture's embedding or linking setting.
Returns
A new picture added to the worksheet which moves and sizes with cells.
Remarks
Position.Mode of a newly added picture will be MoveAndSize.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
Add(String, AnchorCell, ExcelObjectSourceType)
Adds a new picture to the worksheet which moves but doesn't size with cells. Picture size will be determined by decoding the image data.
public ExcelPicture Add(string picturePath, AnchorCell positionFrom, ExcelObjectSourceType sourceType)
Public Function Add(picturePath As String, positionFrom As AnchorCell, sourceType As ExcelObjectSourceType) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFrom
- AnchorCell
The picture's position.
sourceType
- ExcelObjectSourceType
the picture's embedding or linking setting.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Position.Mode of a newly added picture will be Move.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
This method decodes image data to determine picture's size.
Add(String, AnchorCell, Double, Double, LengthUnit)
Adds a new picture to the worksheet which moves but doesn't size with cells.
public ExcelPicture Add(string picturePath, AnchorCell positionFrom, double width, double height, LengthUnit unit)
Public Function Add(picturePath As String, positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFrom
- AnchorCell
The picture's position.
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Position.Mode of a newly added picture will be Move.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
Add(String, AnchorCell, Double, Double, LengthUnit, ExcelObjectSourceType)
Adds a new picture to the worksheet which moves but doesn't size with cells.
public ExcelPicture Add(string picturePath, AnchorCell positionFrom, double width, double height, LengthUnit unit, ExcelObjectSourceType sourceType)
Public Function Add(picturePath As String, positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit, sourceType As ExcelObjectSourceType) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFrom
- AnchorCell
The picture's position.
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
sourceType
- ExcelObjectSourceType
the picture's embedding or linking setting.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Position.Mode of a newly added picture will be Move.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
Add(String, Double, Double, LengthUnit)
Adds a new picture to the worksheet which doesn't move nor sizes with cells. Picture size will be determined by decoding the image data.
public ExcelPicture Add(string picturePath, double left, double top, LengthUnit unit)
Public Function Add(picturePath As String, left As Double, top As Double, unit As LengthUnit) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
left
- System.Double
The distance of the left edge of the picture from the left edge of the worksheet.
top
- System.Double
The distance of the top edge of the picture from the top edge of the worksheet.
unit
- LengthUnit
The length unit in which all length parameters are specified.
Returns
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.
This method decodes image data to determine picture's size.
Add(String, Double, Double, LengthUnit, ExcelObjectSourceType)
Adds a new picture to the worksheet which doesn't move nor sizes with cells. Picture size will be determined by decoding the image data.
public ExcelPicture Add(string picturePath, double left, double top, LengthUnit unit, ExcelObjectSourceType sourceType)
Public Function Add(picturePath As String, left As Double, top As Double, unit As LengthUnit, sourceType As ExcelObjectSourceType) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
left
- System.Double
The distance of the left edge of the picture from the left edge of the worksheet.
top
- System.Double
The distance of the top edge of the picture from the top edge of the worksheet.
unit
- LengthUnit
The length unit in which all length parameters are specified.
sourceType
- ExcelObjectSourceType
the picture's embedding or linking setting.
Returns
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.
This method decodes image data to determine picture's size.
Add(String, Double, Double, Double, Double, LengthUnit)
Adds a new picture to the worksheet which doesn't move nor sizes with cells.
public ExcelPicture Add(string picturePath, double left, double top, double width, double height, LengthUnit unit)
Public Function Add(picturePath As String, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
left
- System.Double
The distance of the left edge of the picture from the left edge of the worksheet.
top
- System.Double
The distance of the top edge of the picture from the top edge of the worksheet.
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
Returns
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.
Add(String, Double, Double, Double, Double, LengthUnit, ExcelObjectSourceType)
Adds a new picture to the worksheet which doesn't move nor sizes with cells.
public ExcelPicture Add(string picturePath, double left, double top, double width, double height, LengthUnit unit, ExcelObjectSourceType sourceType)
Public Function Add(picturePath As String, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit, sourceType As ExcelObjectSourceType) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
left
- System.Double
The distance of the left edge of the picture from the left edge of the worksheet.
top
- System.Double
The distance of the top edge of the picture from the top edge of the worksheet.
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
sourceType
- ExcelObjectSourceType
the picture's embedding or linking setting.
Returns
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.
Add(String, String)
Adds a new picture to the worksheet which moves but doesn't size with cells. Picture size will be determined by using decoding the image data.
public ExcelPicture Add(string picturePath, string positionFromCell)
Public Function Add(picturePath As String, positionFromCell As String) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFromCell
- System.String
The picture's position (for example, "A1").
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Position.Mode of a newly added picture will be Move.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
This method decodes image data to determine picture's size.
Add(String, String, ExcelObjectSourceType)
Adds a new picture to the worksheet which moves but doesn't size with cells. Picture size will be determined by decoding the image data.
public ExcelPicture Add(string picturePath, string positionFromCell, ExcelObjectSourceType sourceType)
Public Function Add(picturePath As String, positionFromCell As String, sourceType As ExcelObjectSourceType) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFromCell
- System.String
The picture's position (for example, "A1").
sourceType
- ExcelObjectSourceType
the picture's embedding or linking setting.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Position.Mode of a newly added picture will be Move.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
This method decodes image data to determine picture's size.
Add(String, String, Double, Double, LengthUnit)
Adds a new picture to the worksheet which moves but doesn't size with cells.
public ExcelPicture Add(string picturePath, string positionFromCell, double width, double height, LengthUnit unit)
Public Function Add(picturePath As String, positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFromCell
- System.String
The picture's position (for example, "A1").
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Position.Mode of a newly added picture will be Move.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
Add(String, String, Double, Double, LengthUnit, ExcelObjectSourceType)
Adds a new picture to the worksheet which moves but doesn't size with cells.
public ExcelPicture Add(string picturePath, string positionFromCell, double width, double height, LengthUnit unit, ExcelObjectSourceType sourceType)
Public Function Add(picturePath As String, positionFromCell As String, width As Double, height As Double, unit As LengthUnit, sourceType As ExcelObjectSourceType) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFromCell
- System.String
The picture's position (for example, "A1").
width
- System.Double
The picture's width.
height
- System.Double
The picture's height.
unit
- LengthUnit
The length unit in which all length parameters are specified.
sourceType
- ExcelObjectSourceType
the picture's embedding or linking setting.
Returns
A new picture added to the worksheet which moves but doesn't size with cells.
Remarks
Position.Mode of a newly added picture will be Move.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
Add(String, String, String)
Adds a new picture to the worksheet which moves and sizes with cells.
public ExcelPicture Add(string picturePath, string positionFromCell, string positionToCell)
Public Function Add(picturePath As String, positionFromCell As String, positionToCell As String) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFromCell
- System.String
The picture's position (top-left corner) (for example, "A1").
positionToCell
- System.String
The picture's end position (bottom-right corner) (for example, "B2").
Returns
A new picture added to the worksheet which moves and sizes with cells.
Remarks
Position.Mode of a newly added picture will be MoveAndSize.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.
Add(String, String, String, ExcelObjectSourceType)
Adds a new picture to the worksheet which moves and sizes with cells.
public ExcelPicture Add(string picturePath, string positionFromCell, string positionToCell, ExcelObjectSourceType sourceType)
Public Function Add(picturePath As String, positionFromCell As String, positionToCell As String, sourceType As ExcelObjectSourceType) As ExcelPicture
Parameters
picturePath
- System.String
The picture's path.
positionFromCell
- System.String
The picture's position (top-left corner) (for example, "A1").
positionToCell
- System.String
The picture's end position (bottom-right corner) (for example, "B2").
sourceType
- ExcelObjectSourceType
the picture's embedding or linking setting.
Returns
A new picture added to the worksheet which moves and sizes with cells.
Remarks
Position.Mode of a newly added picture will be MoveAndSize.
picturePath
parameter must contain supported extension (for example, ".png"), otherwise exception is thrown.