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

SpreadsheetControl.SaveDocument(DocumentFormat) Method

Saves a document to an array of bytes in the specified format.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v19.1.dll

Declaration

public byte[] SaveDocument(
    DocumentFormat format
)

Parameters

Name Type Description
format DocumentFormat

A DocumentFormat enumeration member specifying the format of the document to be saved.

Returns

Type Description
Byte[]

A Byte[] object that is an array of bytes containing document data in the specified format.

Remarks

The SaveDocument method can be used to store a workbook in an external database. Refer to the How to: Store a Workbook in the Database document for additional information.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveDocument(DocumentFormat) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also