UPDATED:
This code example demonstrates how to save and restore ASPxSpreadsheet documents from a database using a Binary column.
Starting with version 15.1, we recommend using the ASPxSpreadsheet.Open method to load a document and call the ASPxSpreadsheet.SaveCopy method to save changes.
In version 15.2, it is also possible to handle the ASPxSpreadsheet.Saving event to save a document by clicking the ribbon's built-in Save button.
For Older Versions:
Use ISpreadsheetComponent.LoadDocument to load a document and ISpreadsheetComponent.SaveDocument - to save it.
See Also:
MVC Version:
T190813: Spreadsheet - How to save and load documents from a database
Question Comments
Added By: MILES GIBSON at: 9/14/2017 5:08:30 PM I am getting the error "Operation is not valid due to the current state of the object" when I try this:
Dim Mystream As IO.Stream = Nothing
PackoutSpreadSheet.SaveDocument(MyStream, DevExpress.Spreadsheet.DocumentFormat.Xlsx)
The spreadsheet has data in it. Ideas?