Class OleObject
Represents an OLE Object on a sheet.
Inherited Members
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class OleObject : IWorksheetDrawingObject, ISheetDrawingObject, IDrawingObject
Properties
AnchoredCell
Exposes the anchored cell associated with OleObject.
Declaration
public Cell AnchoredCell { get; set; }
Property Value
| Type | Description |
|---|---|
| Cell | The anchored cell returned by the operation. |
AutoLoad
Gets or sets whether the host application for the embedded object shall be called to load the object data automatically when the parent workbook is opened.
Declaration
public bool AutoLoad { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
AutoUpdate
Indicates whether the linked object updates the cached data automatically or only when the container requests an update, only present if the embedded object is linked.
Declaration
public bool AutoUpdate { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
BottomRightCell
Exposes the bottom right cell associated with OleObject.
Declaration
public Cell BottomRightCell { get; }
Property Value
| Type | Description |
|---|---|
| Cell | The bottom right cell returned by the operation. |
DisplayAsIcon
Gets or sets whether the OLE Object is displayed as an icon.
Declaration
public bool DisplayAsIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
FileName
Exposes the file name associated with OleObject.
Declaration
public string FileName { get; }
Property Value
| Type | Description |
|---|---|
| string | The file name returned by the operation. |
ImagePath
Exposes the image path associated with OleObject.
Declaration
public string ImagePath { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The image path returned by the operation. |
Link
Exposes the link associated with OleObject.
Declaration
public string Link { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The link returned by the operation. |
Name
Gets ors sets the name of the OLE object.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ParentGroup
Exposes the parent group associated with OleObject.
Declaration
public GroupShape ParentGroup { get; }
Property Value
| Type | Description |
|---|---|
| GroupShape | The parent group returned by the operation. |
Position
Gets the position of the OLE object relative to its anchor.
Declaration
public Position Position { get; }
Property Value
| Type | Description |
|---|---|
| Position |
Positioning
Gets or sets how the OLE object is positioned within a sheet.
Declaration
public AnchorProperties Positioning { get; set; }
Property Value
| Type | Description |
|---|---|
| AnchorProperties |
ProgID
Specifies the ProgID of the embedded object.
Declaration
public string ProgID { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Size
Gets the Size of the OLE object.
Declaration
public Size Size { get; }
Property Value
| Type | Description |
|---|---|
| Size |
Type
Specifies the type of the OLE object.
Declaration
public OleObjectType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| OleObjectType |
Worksheet
Gets the sheet which contains the OLE object.
Declaration
public Worksheet Worksheet { get; }
Property Value
| Type | Description |
|---|---|
| Worksheet |
Methods
GetBytes()
Gets the binary content of the embedded or linked OLE object
Declaration
public byte[] GetBytes()
Returns
| Type | Description |
|---|---|
| byte[] |
GetImageBytes()
Retrieves the requested image bytes from the OleObject.
Declaration
public byte[] GetImageBytes()
Returns
| Type | Description |
|---|---|
| byte[] | The get image bytes returned by the operation. |
SaveAs(string)
Writes as from the OleObject.
Declaration
public void SaveAs(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The path used by the operation. |
SaveImageAs(string)
Writes image as from the OleObject.
Declaration
public void SaveImageAs(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The path used by the operation. |