# WorkbookEvents Class

> WorkbookEvents class in the TX Sheet Control .NET API: Typed, synchronous workbook events. Handlers must not call document methods.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > WorkbookEvents Class
- **1652 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/llms-full.txt

---

Typed, synchronous workbook events. Handlers must not call document methods.

### Syntax

```csharp
public class WorkbookEvents
```

### Members

#### Events

| Event | Description |
|---|---|
| [BeforeChange](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforechange-event/llms-full.txt) |  |
| [BeforeClipboard](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforeclipboard-event/llms-full.txt) |  |
| [BeforeEdit](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforeedit-event/llms-full.txt) |  |
| [BeforeFilter](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforefilter-event/llms-full.txt) |  |
| [BeforeObjectChange](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforeobjectchange-event/llms-full.txt) |  |
| [BeforeSort](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforesort-event/llms-full.txt) |  |
| [BeforeStructure](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforestructure-event/llms-full.txt) |  |
| [CalculationCompleted](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/calculationcompleted-event/llms-full.txt) |  |
| [Changed](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/changed-event/llms-full.txt) |  |
| [Clipboard](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/clipboard-event/llms-full.txt) |  |
| [DataRefreshRequested](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/datarefreshrequested-event/llms-full.txt) |  |
| [Edited](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/edited-event/llms-full.txt) |  |
| [Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/event-event/llms-full.txt) |  |
| [ExportProgress](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/exportprogress-event/llms-full.txt) |  |
| [FileOperationFailed](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/fileoperationfailed-event/llms-full.txt) |  |
| [Filtered](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/filtered-event/llms-full.txt) |  |
| [Loaded](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/loaded-event/llms-full.txt) |  |
| [Loading](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/loading-event/llms-full.txt) |  |
| [LoadProgress](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/loadprogress-event/llms-full.txt) |  |
| [ObjectChanged](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/objectchanged-event/llms-full.txt) |  |
| [Saved](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/saved-event/llms-full.txt) |  |
| [Saving](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/saving-event/llms-full.txt) |  |
| [Sorted](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/sorted-event/llms-full.txt) |  |
| [StructureChanged](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/structurechanged-event/llms-full.txt) |  |
| [ValidationFailed](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/validationfailed-event/llms-full.txt) |  |

### Examples

Subscribe while processing a document and return detached notifications for the application UI or audit trail. Handlers are synchronous: do not call document methods inside them. Only matching operations raise the selected event.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<string[]> CaptureReportNotificationsAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    var events = new List<string>();
    void OnNotification(object? sender, WorkbookEventArgs args)
    {
        events.Add(args.Name + ": " + string.Join(", ", args.Addresses));
    }

    book.Events.Changed += OnNotification;

    try
    {
        await sheet.Cell("A1").SetTextAsync("October invoice");
        await sheet.Cell("A1").FormatAsync(new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
        await control.SaveAsync(StreamType.PDF);
    }
    finally
    {
        book.Events.Changed -= OnNotification;
    }

    return events.ToArray();
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Events and Cancellation](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/events/llms-full.txt)

### Blazor Notifications

The browser host forwards completed notifications asynchronously. Before-events, synchronous loading and saving cancellation hooks, and `ValidationFailed` are not forwarded to C#. Configure validation rules in the workbook before editing. The component `Event` callback covers its forwarded notifications and progress, and `SelectionChanged` reports the screen selection. Handle errors from awaited API methods where they are called.

---

## In This Section

- [WorkbookEvents.BeforeChange Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforechange-event/llms-full.txt): WorkbookEvents.BeforeChange event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.BeforeClipboard Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforeclipboard-event/llms-full.txt): WorkbookEvents.BeforeClipboard event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.BeforeEdit Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforeedit-event/llms-full.txt): WorkbookEvents.BeforeEdit event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.BeforeFilter Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforefilter-event/llms-full.txt): WorkbookEvents.BeforeFilter event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.BeforeObjectChange Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforeobjectchange-event/llms-full.txt): WorkbookEvents.BeforeObjectChange event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.BeforeSort Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforesort-event/llms-full.txt): WorkbookEvents.BeforeSort event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.BeforeStructure Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforestructure-event/llms-full.txt): WorkbookEvents.BeforeStructure event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.CalculationCompleted Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/calculationcompleted-event/llms-full.txt): WorkbookEvents.CalculationCompleted event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Changed Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/changed-event/llms-full.txt): WorkbookEvents.Changed event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Clipboard Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/clipboard-event/llms-full.txt): WorkbookEvents.Clipboard event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.DataRefreshRequested Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/datarefreshrequested-event/llms-full.txt): WorkbookEvents.DataRefreshRequested event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Edited Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/edited-event/llms-full.txt): WorkbookEvents.Edited event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Event Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/event-event/llms-full.txt): WorkbookEvents.Event event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.ExportProgress Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/exportprogress-event/llms-full.txt): WorkbookEvents.ExportProgress event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.FileOperationFailed Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/fileoperationfailed-event/llms-full.txt): WorkbookEvents.FileOperationFailed event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Filtered Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/filtered-event/llms-full.txt): WorkbookEvents.Filtered event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Loaded Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/loaded-event/llms-full.txt): WorkbookEvents.Loaded event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Loading Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/loading-event/llms-full.txt): WorkbookEvents.Loading event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.LoadProgress Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/loadprogress-event/llms-full.txt): WorkbookEvents.LoadProgress event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.ObjectChanged Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/objectchanged-event/llms-full.txt): WorkbookEvents.ObjectChanged event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Saved Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/saved-event/llms-full.txt): WorkbookEvents.Saved event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Saving Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/saving-event/llms-full.txt): WorkbookEvents.Saving event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.Sorted Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/sorted-event/llms-full.txt): WorkbookEvents.Sorted event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.StructureChanged Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/structurechanged-event/llms-full.txt): WorkbookEvents.StructureChanged event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.
- [WorkbookEvents.ValidationFailed Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/validationfailed-event/llms-full.txt): WorkbookEvents.ValidationFailed event in the TX Sheet Control .NET API, with the handler type EventHandler<WorkbookEventArgs> and a C# example.

---

## Nearby

- **Previous:** [WorkbookEventArgs.Warnings Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookeventargs/warnings-property/llms-full.txt)
- **Next:** [WorkbookEvents.BeforeChange Event](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookevents/beforechange-event/llms-full.txt)
