# ISpreadsheet Interface

Exposes some of the methods of the RadzenSpreadsheet component.

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Syntax

```csharp
public interface ISpreadsheet
```

## Properties

| Property | Type | Description |
|------|------|-------------|
| CanRedo | `bool` | Gets whether there is a command to redo. |
| CanUndo | `bool` | Gets whether there is a command to undo. |
| ReadOnly | `bool` | Gets whether the spreadsheet is in read-only mode. When true, every mutation is rejected regardless of per-feature Allow* flags. |
| UICulture | `Globalization.CultureInfo` | Gets the UI culture used for localized strings. Defaults to CurrentUICulture. |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `AcceptAsync()` | `Task<bool>` | Accepts the current edit in the spreadsheet. |
| `ExecuteAsync(Spreadsheet.ICommand command)` | `Task<bool>` | Executes a command through the active view's undo/redo stack. Returns true when the command ran, false when it was rejected by read-only mode, an Allow* flag, sheet protection, or a CommandExecuting handler that called PreventDefault(). |
| `IsFeatureAllowed(Spreadsheet.SpreadsheetFeature feature)` | `bool` | Returns true when the given feature is enabled on the host [RadzenSpreadsheet](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheet.md). Tools should use this to decide whether they should appear disabled. Parameters: `feature`: The feature to check. |
| `LoadWorkbookAsync(Documents.Spreadsheet.Workbook workbook)` | `Task` | Replaces the displayed workbook, resets the active sheet and cached view, and raises WorkbookChanged. Used by the Open tool so it works in any toolbar. Parameters: `workbook`: The workbook to display. |
| `Localize(string key)` | `string` | Returns a localized string for the specified key. Parameters: `key`: The resource key. Returns: The localized string. |
| `Redo()` | `void` | Redoes the last undone command. |
| `Undo()` | `void` | Undoes the last command. |

