Table of Contents

Class XlsxEmbeddedObject

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

An OLE object on a sheet (Phase 218): an embedded file or document, or a link to one, as the sheet's oleObjects list, its embedding part and its drawings state it. Its payload is bytes: never opened, never run.

public sealed class XlsxEmbeddedObject
Inheritance
XlsxEmbeddedObject
Inherited Members

Properties

Anchor

Gets where the object is, from the sheet's list; null when it states no anchor.

ContentType

Gets the content type of the embedded data: application/vnd.openxmlformats-officedocument.oleObject for an OLE container (a packaged file among them), a document's own type for an Office file embedded as itself; empty for a linked object.

IsLinked

Gets whether the object is a link to a file outside the workbook (with no data of its own here).

LinkSource

Gets a linked object's source as the sheet states it (an external reference), or null.

Name

Gets the object's name (its shape's), or empty when the drawings state none.

ProgId

Gets the server's ProgID as the sheet states it: Packager Shell Object for a packaged file, Word.Document.12 for a Word document, and so on.

ShownAsIcon

Gets whether the object is shown as an icon rather than as its content.

Methods

OpenData()

Opens the embedded data as the workbook holds it: an OLE container (read its streams with DocWright.Ole.OlePayload, whose TryOpenNativeContent gives a packaged file's bytes) or an Office file. The bytes are the part's, already held within the limits the workbook was opened with; nothing is decoded or run.

OpenPicture()

Opens the picture Excel draws for the object (its icon or a preview of its content), or returns null when it has none.

Remove()

Takes the object off its sheet: from the sheet's list, its drawing and its legacy drawing, with its data part and its picture when nothing else uses them.

ToString()