Back to Devexpress

SpreadsheetControl.LoadDocument(Stream, DocumentFormat) Method

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-dot-loaddocument-x28-system-dot-io-dot-stream-devexpress-dot-spreadsheet-dot-documentformat-x29.md

latest2.1 KB
Original Source

SpreadsheetControl.LoadDocument(Stream, DocumentFormat) Method

Loads a document from a stream, specifying the document format.

Namespace : DevExpress.Xpf.Spreadsheet

Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public bool LoadDocument(
    Stream stream,
    DocumentFormat format
)
vb
Public Function LoadDocument(
    stream As Stream,
    format As DocumentFormat
) As Boolean

Parameters

NameTypeDescription
streamStream

The stream from which to load a document.

| | format | DocumentFormat |

The DocumentFormat enumeration member.

|

Returns

TypeDescription
Boolean

true, if a document is loaded successfully; otherwise, false.

|

Remarks

If the data has an incorrect format, the SpreadsheetControl.InvalidFormatException event fires.

Note

With the format method parameter passed as DocumentFormat.Undefined, the loaded document format is detected automatically.

See Also

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace