Skip to main content
A newer version of this page is available. .

SpreadsheetBuilder.Open(String, DocumentFormat, Func<Byte[]>) Method

Opens a document specified by an array of bytes.

Namespace: DevExpress.AspNetCore.Spreadsheet

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

NuGet Package: DevExpress.AspNetCore.Spreadsheet

Declaration

public SpreadsheetBuilder Open(
    string documentId,
    DocumentFormat documentFormat,
    Func<byte[]> contentAccessorByBytes
)

Parameters

Name Type Description
documentId String

The path to the document to open.

documentFormat DocumentFormat

The document format.

contentAccessorByBytes Func<Byte[]>

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

Returns

Type Description
SpreadsheetBuilder

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

Remarks

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 Spreadhseet. If the specified document has not been found in the opened documents, a delegate method specified by the contentAccessorByBytes parameter is called. It allows you to manually obtain a byte array from which to open a document (for instance, to load a document from a database).

See Also