.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

ISpreadsheetComponent.LoadDocument(String, DocumentFormat) Method

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

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

bool LoadDocument(
    string fileName,
    DocumentFormat format
)
Function LoadDocument(
    fileName As String,
    format As DocumentFormat
) As Boolean
bool LoadDocument(
    string fileName,
    DocumentFormat format
)
Function LoadDocument(
    fileName As String,
    format As DocumentFormat
) As Boolean
bool LoadDocument(
    string fileName,
    DocumentFormat format
)
Function LoadDocument(
    fileName As String,
    format As DocumentFormat
) As Boolean

Parameters

Name Type Description
fileName String

A string specifying the file to load (including the full path).

format DocumentFormat

One of the DocumentFormat members.

Parameters

Name Type Description
fileName String

A string specifying the file to load (including the full path).

format DocumentFormat

One of the DocumentFormat members.

Parameters

Name Type Description
fileName String

A string specifying the file to load (including the full path).

format DocumentFormat

One of the DocumentFormat members.

Returns

Type Description
Boolean

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

Returns

Type Description
Boolean

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

Returns

Type Description
Boolean

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

Examples

Call the SpreadsheetControl.LoadDocument method with the file path to load a workbook from the existing file. Specify the file format as the second parameter of the method using the DocumentFormat enumerator.

// Load a workbook from a file.
spreadsheetControl1.LoadDocument("Documents\\Document.xlsx", DocumentFormat.OpenXml);
See Also