The main document class, contains a collection of worksheets, named ranges and other related objects.
Namespace: MindFusion.Spreadsheet.Wpf
Assembly: MindFusion.Spreadsheet.Wpf
C# Copy Code |
---|
public class Workbook : INotifyPropertyValueChanged, ISupportInitialize, IDocumentPaginatorSource |
Visual Basic Copy Code |
---|
Public Class Workbook |
The Workbook class is used to manage a collection of related Worksheet and NamedRange objects, provides undo/redo and formula calculations.
The worksheets of the workbook can be accessed and managed through the Worksheets collection of the Workbook class. Worksheets are added to the workbook indirectly, through the Add method of this collection. Respectively, the NamedRange objects of the workbook are managed through the NamedRanges collection.
Undo and redo can be enabled and disabled through the UndoEnabled property. To undo or redo an action, use the Undo and Redo methods. To check if there is an action to be undone or redone, use the CanUndo and CanRedo properties. When an action is undone or redone, the ActionUndone or ActionRedone events are raised.
To specify the culture of the workbook and its associated worksheets, use the Locale property. This culture is used when parsing and formatting data in the worksheets. The default of this property is the culture of the current thread.
The workbook can be serialized to and deserialized from a stream or a file through the respective SaveToXml and LoadFromXml methods.
To display a workbook on a form, use the built-in WorkbookView control. To print a workbook, use the WorkbookPrinter class. To export or import a workbook, use the appropriate importer or exporter class - PdfExporter, CsvExporter, CsvImporter, CalcImporter, and ExcelImporter.
System.Object
MindFusion.Spreadsheet.Wpf.Workbook