Skip to main content

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.v24.2.dll

Declaration

[ComVisible(false)]
public class SpreadsheetControl :
    Control,
    IEFDataSourceGlobalEventSubscriber,
    IGestureClient,
    ISupportLookAndFeel,
    IMouseWheelSupport,
    IMouseWheelScrollClient,
    IPrintable,
    IBasePrintable,
    IToolTipControlClient,
    IBarControllerOwner,
    IDpiScaleProvider,
    ISpreadsheetDocumentServer,
    IBatchUpdateable,
    IServiceContainer,
    IServiceProvider,
    IDisposable,
    ISpreadsheetControl,
    ISpreadsheetComponent,
    ISupportsContentChanged,
    ICommandAwareControl<SpreadsheetCommandId>,
    IWin32Window,
    IInnerSpreadsheetControlOwner,
    IInnerSpreadsheetDocumentServerOwner,
    IDpiProvider,
    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.

Implements

Inheritance

See Also