Back to Devexpress

How to: Access a Workbook

windowsforms-15355-controls-and-libraries-spreadsheet-examples-workbooks-how-to-access-a-workbook.md

latest2.2 KB
Original Source

How to: Access a Workbook

  • Apr 22, 2022

To programmatically modify a workbook loaded in the SpreadsheetControl, access the object implementing the IWorkbook interface via 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.

See Also

Workbook

How to: Create a New Workbook

How to: Load a Document into SpreadsheetControl

How to: Save a Document to a File