Represents a command that can track and undo changes of a Worksheet.
Namespace: MindFusion.Spreadsheet.Wpf
Assembly: MindFusion.Spreadsheet.Wpf
C# Copy Code |
---|
public class ChangeWorksheetCommand : TrackChangesCommand |
Visual Basic Copy Code |
---|
Public Class ChangeWorksheetCommand |
The 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.
The 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) |
System.Object
MindFusion.Spreadsheet.Wpf.Command
MindFusion.Spreadsheet.Wpf.DisposableCommand
MindFusion.Spreadsheet.Wpf.TrackChangesCommand
MindFusion.Spreadsheet.Wpf.ChangeWorksheetCommand