Skip to main content
A newer version of this page is available. .

SpreadsheetControl Class

Emulates the Microsoft® Excel® appearance and allows you to create, load, edit, save and print spreadsheet documents.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v19.2.dll

Declaration

[ComVisible(false)]
[ToolboxBitmap(typeof(SpreadsheetControl), "Bitmaps256.SpreadsheetControl.bmp")]
[Docking(DockingBehavior.Ask)]
public class SpreadsheetControl :
    Control,
    IEFDataSourceGlobalEventSubscriber,
    IGestureClient,
    ISupportLookAndFeel,
    IMouseWheelSupport,
    IMouseWheelScrollClient,
    IPrintable,
    IBasePrintable,
    IToolTipControlClient,
    IBarControllerOwner,
    ISpreadsheetDocumentServer,
    IBatchUpdateable,
    IServiceContainer,
    IServiceProvider,
    IDisposable,
    ISpreadsheetControl,
    ISpreadsheetComponent,
    ISupportsContentChanged,
    IWin32Window,
    ICommandAwareControl<SpreadsheetCommandId>,
    IInnerSpreadsheetControlOwner,
    IInnerSpreadsheetDocumentServerOwner,
    INotifyPropertyChanged

The following members return SpreadsheetControl objects:

Remarks

The SpreadsheetControl class specifies a visual control that allows you to create, load, modify, print, save and convert spreadsheet documents in different formats.

SpreadsheetControl_Class

The IWorkbook interface represents a spreadsheet document. Use the SpreadsheetControl.Document property to access a workbook loaded into the SpreadsheetControl. You can create a new document or load an existing file, as shown below:

// Load a document into the Spreadsheet control.
IWorkbook workbook = spreadsheetControl.Document;
workbook.LoadDocument("Document.xlsx", DocumentFormat.Xlsx);

The IWorkbook interface provides a comprehensive set of properties and methods you can use to work with worksheets, rows, columns, and cells. See the Examples section for details.

The SpreadsheetControl’s formula calculation engine allows you to construct complex formulas with various functions, create shared and array formulas. You can also create custom functions for use in formulas.

The SpreadsheetControl supports defined names, tables, pivot tables, charts, pictures and shapes, and introduces the mail merge mechanism.

The SpreadsheetControl.Options property provides access to the Spreadsheet-related settings. Use the SpreadsheetControlOptions.Behavior property to access an object that allows you to disable different spreadsheet operations. Use the SpreadsheetControlOptions.Print options to control how a printed document is generated and previewed. The SpreadsheetControlOptions.View options specify display settings for the control.

The SpreadsheetControl implements a wide range of events that allow you to track user actions, customize the appearance of Spreadsheet elements, handle exceptions, and so on. The Events document lists the available events.

Refer to the Visual Elements section for details on the Spreadsheet control’s user interface and built-in dialogs.

Inheritance

See Also