Back to Devexpress

How to: Access a Workbook

wpf-117093-controls-and-libraries-spreadsheet-examples-workbooks-how-to-access-a-workbook.md

latest1.6 KB
Original Source

How to: Access a Workbook

  • Jun 07, 2019

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.

csharp
using DevExpress.Spreadsheet;
// ...

// Access a workbook.
IWorkbook workbook = spreadsheetControl1.Document;
vb
Imports DevExpress.Spreadsheet
' ...

' Access a workbook.
Dim workbook As IWorkbook = 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.