Represents a command that can track and undo changes of a Worksheet.
Namespace: MindFusion.Spreadsheet
Assembly: MindFusion.Spreadsheet.WinForms
SyntaxC#
Copy Code
|
|---|
public class ChangeWorksheetCommand : TrackChangesCommand |
Visual Basic
Copy Code
|
|---|
Public Class ChangeWorksheetCommand |
RemarksThe ChangeWorksheetCommand can be used to track and undo worksheet changes. The ChangeWorksheetCommand class cannot be instantiated directly. To create a ChangeWorksheetCommand object, call the StartChangeOperation method of the Workbook class. After the command has been started, most modifications of the worksheet will be automatically recorded into this command. To complete the command, either call the CommitChangeOperation method of the Workbook class or the Dispose method of the command itself. To cancel the command (and revert all recorded modifications), call the CancelChangeOperation method of the Workbook class or the Cancel method of the command.
ExampleThe following code changes the name and the data of an existing worksheet. Note, that due to the disposable pattern, the change command is automatically executed at the end of the using block.
C#
Copy Code
|
|---|
using (workbook.StartChangeOperation(worksheet)) |
Visual Basic
Copy Code
|
|---|
Using workbook.StartChangeOperation(worksheet) |
Inheritance HierarchySystem.Object![]()
MindFusion.Spreadsheet.Command
MindFusion.Spreadsheet.DisposableCommand
MindFusion.Spreadsheet.TrackChangesCommand
MindFusion.Spreadsheet.ChangeWorksheetCommand
See Also