Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Collapse]Spreadsheet
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
   [Expand]Spreadsheet Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Table Overview
   [Expand]Charting Overview
    Printing
    Events
   [Expand]Mail Merge Overview
    Protection
    Find and Replace
   [Collapse]Visual Elements
     Workbook
     Worksheet
    [Expand]Cells and Cell Ranges
     Rows and Columns
     Formulas
     Name Box
     Pictures
    [Expand]Dialogs
    Services
   [Expand]Shortcuts
   [Expand]Examples
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Workbook

A workbook (IWorkbook) represents a SpreadsheetControl file. To access the workbook that is currently loaded in the SpreadsheetControl, use the SpreadsheetControl.Document property. By default, when you start a spreadsheet application, it already contains a workbook with an empty worksheet. To provide end-users with the capability to load, save and print a workbook, add the Common Ribbon page group to the SpreadsheetControl. To see an example of how to provide a Ribbon UI for the SpreadsheetControl, refer to Getting Started.

The table below lists basic operations that enable end-users to work with workbooks, and the corresponding API methods and properties.

Action

End-user capabilities

API methods/properties

Create a blank workbook

Click the New button in the Common group within the File tab, or press CTRL+N.

SpreadsheetControl.CreateNewDocument

ISpreadsheetComponent.CreateNewDocument

How to: Create a New Workbook

Load a workbook

Click the Open button in the Common group, or press CTRL+O.

The SpreadsheetControl supports the following file formats.

  • Excel Workbook (*.xlsx)
  • Excel Macro-Enabled Workbook (*.xlsm)
  • Excel 97-2003 Workbook (*.xls)
  • Tab-delimited Text File format (*.txt)
  • Comma-separated Values File format (*.csv)

SpreadsheetControl.LoadDocument

ISpreadsheetComponent.LoadDocument

How to: Load a Document into SpreadsheetControl

Save a workbook

Click the Save as button in the Common group, or press F12, to save a newly created workbook.

Click the Save button, or press CTRL+S to save the active workbook in its current file format and location.

The SpreadsheetControl allows you to save a document in the following formats.

  • Excel Workbook (*.xlsx)
  • Excel Macro-Enabled Workbook (*.xlsm)
  • Excel 97-2003 Workbook (*.xls)
  • Tab-delimited Text File format (*.txt)
  • Comma-separated Values File format (*.csv)

SpreadsheetControl.SaveDocument

ISpreadsheetComponent.SaveDocument

How to: Save a Document to a File

Print a workbook

Before printing a workbook, you can specify print settings for each worksheet separately, as described in the Worksheet topic.

  • To view a workbook as it will be printed, click the Print Preview button in the Common group.

  • To print a document, click the Print button, or press CTRL+P.

  • To send a workbook directly to the default printer without setting print options, click the Quick Print button.

Printing

Specify document properties

To view and edit document properties, invoke the Properties dialog by clicking the Document Properties button in the Info group.

IWorkbook.DocumentProperties

DocumentProperties.Custom

How to: Specify Document Properties

Expanded End-User Restrictions

To restrict end-user actions when working with workbooks, use the SpreadsheetControlOptions.Behavior property, which provides access to restriction settings. The table below lists possible restrictions you can set when working with workbooks in the SpreadsheetControl.

Restriction

Description

SpreadsheetBehaviorOptions.CreateNew Gets or sets whether end-users are allowed to create new documents.
SpreadsheetBehaviorOptions.Open Gets or sets whether end-users are allowed to open documents.
SpreadsheetBehaviorOptions.Print Gets or sets whether end-users are allowed to print documents.
SpreadsheetBehaviorOptions.Save Gets or sets whether end-users are allowed to save documents.
SpreadsheetBehaviorOptions.SaveAs Gets or sets whether end-users are allowed to perform the Save Document As operation.

Set the required property to DocumentCapability.Disabled or DocumentCapability.Hidden to disable or hide the corresponding command in the Ribbon UI.

How would you rate this topic?​​​​​​​