[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Collapse]Spreadsheet
   [Expand]Product Information
    Getting Started
   [Collapse]Concepts
    [Collapse]Spreadsheet Document
      Workbook
      Worksheets
      Cells and Cell Ranges
      Rows and Columns
      Comments
      Measure Units
     Supported Formats
     Import and Export
    [Expand]Cell Basics
    [Expand]Spreadsheet Formulas
     Defined Names
     Data Validation
    [Expand]Data Presentation
    [Expand]Charting
     Printing
    [Expand]Mail Merge
     Protection
     Adaptivity
     Keyboard Shortcuts
   [Expand]Visual Elements
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Workbook

A workbook is a document in the ASPxSpreadsheet control. It is an object that exposes the IWorkbook interface. The IWorkbook interface provides a comprehensive set of properties and methods required to manipulate the corresponding workbook. To access a workbook that is currently loaded in the ASPxSpreadsheet control, use the ASPxSpreadsheet.Document property. This is the starting point for using the ASPxSpreadsheet API.

A workbook consists of one or more worksheets stored within the WorksheetCollection collection. To access this collection, use the IWorkbook.Worksheets property. Each worksheet has a unique name and position within the workbook. Thus, you can access an individual worksheet by its name or index via the WorksheetCollection.Item property.

Use other WorksheetCollection object properties to manage the workbook's set of worksheets (add a new worksheet, remove an existing worksheet, assign an active worksheet, etc.).

By default, when you create an ASPxSpreadsheet instance, it contains a workbook with one empty worksheet ("Sheet1"). The same workbook is also created when you call the IWorkbook.CreateNewDocument method. To load an existing document into the ASPxSpreadsheet control, use the IWorkbook.LoadDocument method. To save a workbook after all modifications are complete, use the IWorkbook.SaveDocument method. The Supported Formats topic lists the file formats supported for loading and saving workbooks.

A workbook contains a collection of styles, which can be used to format cell appearance in any worksheet. To access and modify this collection (for example, add a new style or modify an existing style), use the IWorkbook.Styles property.

The IWorkbook.DefinedNames collection includes cell, formula and constant defined names that can be used in any worksheet within the workbook. See the Defined Names topic for more information.

The IWorkbook.DocumentSettings property provides access to the workbook settings. For example, use the DocumentSettings.Calculation property to set different workbook calculation options.

You can also specify other workbook options using the corresponding properties of an object returned by IWorkbook.Options.

Expanded See Also

Is this topic helpful?​​​​​​​