Workbook.LoadDocumentProperties(Stream, DocumentFormat) Method
Loads document properties for a workbook from the specified stream.
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.v24.2.dll
NuGet Package: DevExpress.Document.Processor
Declaration
public ReadOnlyDocumentProperties LoadDocumentProperties(
Stream stream,
DocumentFormat format
)
Parameters
Name | Type | Description |
---|---|---|
stream | Stream | A stream that contains the target document. |
format | DocumentFormat | An enumeration member that defines the document format. |
Returns
Type | Description |
---|---|
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.