SpreadsheetBuilder.Open(String, DocumentFormat) Method
Opens a document in the specified format from a file system.
Namespace: DevExpress.AspNetCore.Spreadsheet
Assembly: DevExpress.AspNetCore.Spreadsheet.v24.2.dll
Declaration
public SpreadsheetBuilder Open(
string path,
DocumentFormat documentFormat
)
Parameters
Name | Type | Description |
---|---|---|
path | String | A document path. |
documentFormat | DocumentFormat | A document format. |
Returns
Type | Description |
---|---|
SpreadsheetBuilder | An object that can be used to further configure the Spreadsheet. |
Remarks
This method overload allows you to disable automatic format detection and improve performance when the Spreadsheet opens a document. Call the Open(String) method to determine the document’s format automatically when you open a document.
The example below demonstrates how to open a document from a file system:
@(Html.DevExpress()
.Spreadsheet("spreadsheet")
.Open("path-to-your-document", DocumentFormat.Xlsx)
)
Refer to the following section for more information: Open a Document from a File System.
See Also