Back to Devexpress

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

aspnetmvc-devexpress-dot-web-dot-mvc-dot-spreadsheetextension-dot-open-x28-system-dot-string-devexpress-dot-spreadsheet-dot-documentformat-system-dot-func-system-dot-io-dot-stream-x29.md

latest2.6 KB
Original Source

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

Opens a document specified by a stream.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public SpreadsheetExtension Open(
    string uniqueDocumentID,
    DocumentFormat format,
    Func<Stream> contentAccessorByStream
)
vb
Public Function Open(
    uniqueDocumentID As String,
    format As DocumentFormat,
    contentAccessorByStream As Func(Of Stream)
) As SpreadsheetExtension

Parameters

NameTypeDescription
uniqueDocumentIDString

A string value that uniquely identifies the document to open (the document’s DocumentId).

| | format | DocumentFormat |

A DocumentFormat object specifying the document format.

| | contentAccessorByStream | Func<Stream> |

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

|

Returns

TypeDescription
SpreadsheetExtension

A SpreadsheetExtension object representing the Spreadsheet extension.

|

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 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

SpreadsheetExtension Class

SpreadsheetExtension Members

DevExpress.Web.Mvc Namespace