Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Create a New Workbook

By default, when you create a SpreadsheetControl instance, it contains a workbook with one empty worksheet (“Sheet1”). The same workbook is also created when you call the control’s SpreadsheetControl.CreateNewDocument method or the ISpreadsheetComponent.CreateNewDocument method of the IWorkbook object.

The SpreadsheetControl.EmptyDocumentCreated event is raised after a new document is created.

spreadsheetControl1.CreateNewDocument();

To load an existing document into a SpreadsheetControl, use the SpreadsheetControl.LoadDocument or IWorkbook.LoadDocument method. To save a workbook after all modifications are complete, use the SpreadsheetControl.SaveDocument or IWorkbook.SaveDocument method. See the How to: Load a Document into SpreadsheetControl and How to: Save a Document to a File examples.

See Also