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

Workbook Members

A non-visual component that provides complete spreadsheet functionality.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this class in production code.

Constructors

Name Description
Workbook() Initializes a new instance of the Workbook class with the default settings.

Properties

Name Description
ChartSheets

Provides access to a collection of chart sheets contained in the workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Clipboard

Provides access to the object used for working with the system clipboard.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

CurrentAuthor

Gets the system username.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

CustomFunctions

Provides access to a collection of custom functions in a workbook

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

CustomXmlParts

Provides access to the collection of custom XML parts in the document.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

DefinedNames

Gets the collection of defined names whose scope is the current workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

DocumentProperties

Provides access to the document properties associated with a workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

DocumentSettings

Provides access to the settings that specify how the calculation is performed and what reference style is used.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExternalWorkbooks

Provides access to the collection of source workbooks used for creating external references in the current workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

FormulaEngine Provides access to a FormulaEngine object to parse or evaluate a formula.
Functions

Provides access to the built-in functions in a workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

GlobalCustomFunctions

Provides access to a collection of custom functions which are not limited in scope to the workbook in which the functions reside.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

HasMacros

Determines whether the workbook has VBA projects (macros).

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

History

Provides access to the history of operations performed in a workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

IsDisposed

Gets whether a workbook has been disposed of.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

IsProtected Gets whether the workbook is protected.
IsUpdateLocked

Returns a value indicating whether the Workbook object is locked for update.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

MailMergeDataMember

Gets or sets a specific data member in a data source that contains several tables or members.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

MailMergeDataSource

Gets or sets the data source for the mail merge.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

MailMergeOptions Provides access to the mail merge options.
MailMergeParameters Provides access to a collection of parameters for queries used to obtain data in mail merge.
Model For internal use.
Modified

Gets or sets whether the workbook content was modified since it was last saved.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Options

Provides access to the variety of options which can be specified for the workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Path

Gets the file name into which the workbook is saved or from which it is loaded.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

PivotCaches

Returns a PivotCacheCollection collection that represents all the PivotTable caches in the specified workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

Range

Provides access to the cell range in the workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

RealTimeData Provides access to an object that is used to manually update real-time data and reconnect to data servers.
Sheets

Provides access to a collection of all sheets contained in the workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Styles

Provides access to the collection of cell styles in the current workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

TableStyles

Provides access to the collection of styles to format tables in the workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Tag Gets or sets the data associated with a Workbook object.
Unit

Gets or sets a unit of measure used in the workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Worksheets

Gets a collection of worksheets contained in the workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Methods

Name Description
AddService(Type, ServiceCreatorCallback, Boolean)

Adds the specified service to the service container.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

AddService(Type, ServiceCreatorCallback)

Adds the specified service to the service container.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

AddService(Type, Object, Boolean)

Adds the specified service to the service container.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

AddService(Type, Object)

Adds the specified service to the service container.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

BeginUpdate()

Locks the Workbook object until the Workbook.EndUpdate method is called.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

Calculate()

Forces recalculation of the workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

Calculate(Range) Forces recalculation of the specified cell range in a worksheet.
Calculate(Worksheet) Forces recalculation of the specified worksheet in a workbook.
CalculateFull() Forces a full calculation of the data in a workbook.
CalculateFullRebuild() Forces a full calculation of the data and rebuilds the dependencies.
CancelUpdate() This method supports the internal infrastructure and is not intended to be called directly from your code. Use the Workbook.EndUpdate method instead.
CreateNewDocument()

Creates and loads a new empty workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Dispose()

Releases resources associated with a Workbook instance.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

EndUpdate()

Unlocks the Workbook object.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
Evaluate(String, FormulaEvaluationContext)

Evaluates the specified formula in a certain context.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

Evaluate(String)

Evaluates the specified formula.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

ExportToHtml(Stream, Range)

Exports the specified range to the specified stream in HTML format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToHtml(Stream, Worksheet)

Exports the specified worksheet to the specified stream in HTML format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToHtml(Stream, HtmlDocumentExporterOptions)

Exports the document’s data to the specified stream in HTML format using the specified options.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToHtml(Stream, Int32)

Exports the specified worksheet to the specified stream in HTML format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToHtml(String, Range)

Exports the specified range to the specified file in HTML format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToHtml(String, Worksheet)

Exports the specified worksheet to the specified file in HTML format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToHtml(String, HtmlDocumentExporterOptions)

Exports the document’s data to the specified file in HTML format using the specified options.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToHtml(String, Int32)

Exports the specified worksheet to the specified file in HTML format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToPdf(Stream, PdfExportOptions)

Exports the workbook to the specified stream in PDF format using the specified options.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToPdf(Stream)

Exports the workbook to the specified stream in PDF format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

ExportToPdf(String, PdfExportOptions)

Exports the workbook to the specified file path in PDF format using the specified options.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

ExportToPdf(String)

Exports the workbook to the specified file path in PDF format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

GenerateMailMergeDocuments()

Performs a mail merge and returns the collection of resulting workbooks.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

GetHashCode() Serves as the default hash function. Inherited from Object.
GetService(Type)

Gets the service object of the specified type.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

GetService<T>()

Gets the specified service.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

GetType() Gets the Type of the current instance. Inherited from Object.
LoadDocument(Byte[], DocumentFormat) Loads a document from a byte array.
LoadDocument(Byte[]) Loads the document from a Byte[] array.
LoadDocument(Stream, DocumentFormat)

Loads a document from a stream, specifying the document format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

LoadDocument(Stream) Loads the document from a stream.
LoadDocument(String, DocumentFormat)

Loads a document from a file, specifying the document format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

LoadDocument(String)

Loads a document from a file.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
Merge(IWorkbook[]) static

Combines the specified workbooks into a new document.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

Print()

Prints the document to the default printer.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Print(PrinterSettings)

Prints the document using the specified printer settings.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

Protect(String, Boolean, Boolean) Protects the structure and windows of a workbook.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
RemoveService(Type, Boolean)

Removes the service of the specified type from the service container.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

RemoveService(Type)

Removes the service of the specified type from the service container.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

ReplaceService<T>(T)

Performs a service substitution.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

SaveDocument(DocumentFormat) Saves a document to an array of bytes in the specified format.
SaveDocument(Stream, DocumentFormat)

Saves the workbook to a stream, specifying the export format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

SaveDocument(String, DocumentFormat)

Saves the document to a file, specifying the document format.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

SaveDocument(String)

Saves the document to the specified file. The file format is identified by the file extension.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

Search(String, SearchOptions)

Performs a search in the current document by using the specified options.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

Search(String)

Performs a search in the current document by using the default parameters.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this method in production code.

ToString() Returns a string that represents the current object. Inherited from Object.
Unprotect(String) Removes protection from a workbook.

Events

Name Description
ActiveSheetChanged

Occurs after an active worksheet in a workbook has been changed.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ActiveSheetChanging

Occurs when an active worksheet in a workbook is about to be changed.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

BeforeExport

Occurs before the document is saved (exported to a certain format).

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

BeforeImport

Occurs before a document is loaded (imported from an external source).

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

BeforePrintSheet Occurs before printing a workbook.
ClipboardDataObtained

Occurs after data on the clipboard is obtained and recognized, but before data is actually pasted.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ClipboardDataPasted

Occurs after data has been pasted from the clipboard onto a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ClipboardDataPasting

Occurs before data is pasted into destination cells.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ColumnsInserted

Occurs after new columns have been added to a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ColumnsInserting Occurs before inserting new columns into a worksheet.
ColumnsRemoved

Occurs after columns have been deleted from a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ColumnsRemoving Occurs before deleting columns from a worksheet.
CommentInserted Occurs when a comment is inserted.
CommentInserting Occurs before inserting a comment.
CommentRemoved Occurs when a comment is deleted.
CommentRemoving Occurs before deleting a comment.
ContentChanged

Occurs when the workbook’s undo history changes. By default, undo history is not logged for the Workbook instance, so the event is not raised.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

CopiedRangePasted

Occurs after the range content has been pasted into target cells.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

CopiedRangePasting

Occurs before the range content is pasted into target cells.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

CustomAssemblyLoading

Occurs before a custom assembly is loaded for use as the Entity Framework data source during mail merge and allows cancelling loading.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

DefinedNameConflictResolving

Occurs when the formula or sheet being moved or copied contains a defined name which already exists on the destination worksheet or workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

DocumentClosing

Occurs when a document that has not yet been saved is about to be closed.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this property in production code.

DocumentLoaded

Occurs after a document is loaded.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

DocumentSaved

Occurs after a document has been saved.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

EmptyDocumentCreated

Occurs when a new document is created.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

EncryptedFileIntegrityCheckFailed Raises when the encrypted file did not pass the data integrity verification.
EncryptedFilePasswordCheckFailed Occurs when the encryption password is empty or invalid.
EncryptedFilePasswordRequest Raises when the WorkbookImportOptions.Password property is not set or contains a wrong password.
InitializeDocument

Occurs before a document is loaded. Handle this event to set initial document settings.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

InvalidFormatException

Fires when the supplied data could not be recognized as data in the assumed format for import.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ModifiedChanged

Occurs when the value of the Workbook.Modified property is changed.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

PanesFrozen

Occurs after a worksheet area has been frozen.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

PanesUnfrozen

Occurs after a frozen worksheet area has been unlocked.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

RangeCopied

Occurs after the range content has been copied.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

RangeCopying

Occurs before a cell range is copied in a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

RowsInserted

Occurs after new rows have been added to a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

RowsInserting Occurs before inserting new rows into a worksheet.
RowsRemoved

Occurs after rows have been deleted from a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

RowsRemoving Occurs before deleting rows from a worksheet.
SchemaChanged

Occurs when a worksheet or defined name is renamed, inserted or deleted.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ScrollPositionChanged

Occurs when the scroll position changes in a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

SelectionChanged

Fires in response to changing cell selection in a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ShapeInserted

Occurs after a drawing object has been inserted into a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ShapeRemoved

Occurs after a drawing object has been removed from a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ShapeRemoving

Occurs before a drawing object is removed from a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ShapesCopying

Occurs before a drawing object is copied in a worksheet.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

SheetInserted

Occurs after a new worksheet has been added to a workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

SheetRemoved

Occurs after a worksheet has been removed from a workbook.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

SheetRemoving Occurs before a worksheet is removed from a workbook.
SheetRenamed

Occurs after a worksheet has been renamed.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

SheetRenaming

Occurs when a worksheet is about to be renamed.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

UnitChanged

Fires after a unit of measurement used in the workbook is changed.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

UnitChanging

Fires before a unit of measurement used within the workbook is changed.

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use this event in production code.

ValidateCustomSqlQuery Allows validation of the custom SQL query created using the Data Source Wizard.
See Also