Skip to main content

How to: Access a Workbook

To programmatically modify a workbook loaded in the SpreadsheetControl, access the object implementing the IWorkbook interface using the SpreadsheetControl.Document property. This object is the starting point for using the SpreadsheetControl API.

using DevExpress.Spreadsheet;
// ...

// Access a workbook.
IWorkbook workbook = spreadsheetControl1.Document;

The IWorkbook interface provides a comprehensive set of properties and methods required to manipulate the workbook (for example, to load, save and print workbooks, manage worksheets, rows, columns and cells, use formulas in cells, format cells, etc.) For more information, see the Examples section.