Back to Devexpress

Workbook.LoadDocumentProperties(Byte[], DocumentFormat) Method

officefileapi-devexpress-dot-spreadsheet-dot-workbook-dot-loaddocumentproperties-x28-system-dot-byte-devexpress-dot-spreadsheet-dot-documentformat-x29.md

latest2.7 KB
Original Source

Workbook.LoadDocumentProperties(Byte[], DocumentFormat) Method

Loads document properties for a workbook from the specified byte array.

You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this method in production code.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public ReadOnlyDocumentProperties LoadDocumentProperties(
    byte[] buffer,
    DocumentFormat format
)
vb
Public Function LoadDocumentProperties(
    buffer As Byte(),
    format As DocumentFormat
) As ReadOnlyDocumentProperties

Parameters

NameTypeDescription
bufferByte[]

A byte array that contains document data.

| | format | DocumentFormat |

An enumeration member that defines the document format.

|

Returns

TypeDescription
ReadOnlyDocumentProperties

An object that stores the retrieved document properties.

|

Remarks

Use this method to load document metadata (document properties) without loading the workbook itself. You can use the retrieved metadata to search for a specific document, to organize files, or to collect statistics.

The Spreadsheet Document API can load document properties from workbooks in the following formats:

  • XLSX,

  • XLSM,

  • XLSB,

  • XLS,

  • XLTX,

  • XLTM,

  • XLT,

  • XML (XML Spreadsheet 2003).

For CSV and TXT files or encrypted documents, the LoadDocumentProperties method returns empty properties. If the loaded document is corrupted or its format is unknown, the LoadDocumentProperties method throws an exception.

See Also

How to: Load Document Properties for a Workbook

Workbook Class

Workbook Members

DevExpress.Spreadsheet Namespace