General Information
.NET Subscription
Desktop
Web
Controls and Extensions
Mainteinance Mode
Enterprise and Analytic Tools
Quality Assurance and Productivity
Frameworks and Libraries
General Information
.NET Subscription
Desktop
Web
Controls and Extensions
Mainteinance Mode
Enterprise and Analytic Tools
Quality Assurance and Productivity
Frameworks and Libraries
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
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-spreadsheetcontrol-api-e4655
// Load a workbook from a file.
spreadsheetControl1.LoadDocument("Documents\\Document.xlsx", DocumentFormat.OpenXml);
' Load a workbook from a file.
spreadsheetControl1.LoadDocument("Documents\Document.xlsx", DocumentFormat.OpenXml)