Skip to main content

SpreadsheetBuilder.Open(String, DocumentFormat, Func<Stream>) Method

Opens a document specified by a stream.

Namespace: DevExpress.AspNetCore.Spreadsheet

Assembly: DevExpress.AspNetCore.Spreadsheet.v22.1.dll


public SpreadsheetBuilder Open(
    string documentId,
    DocumentFormat documentFormat,
    Func<Stream> contentAccessorByStream


Name Type Description
documentId String

The path to the document to open.

documentFormat DocumentFormat

The document format.

contentAccessorByStream Func<Stream>

A method delegate to obtain a stream from which to open the document.


Type Description

An object that can be used to further configure the Spreadsheet.


This method tries to find the specified document in a list of already opened documents maintained by the DocumentManager. If the document is found, its instance is opened in the Spreadsheet. If the specified document has not been found in the opened documents, a delegate method specified by the contentAccessorByStream parameter is called. It allows you to manually obtain a steam from which to open a document (for instance, to load a document from a database).

See Also