# Spreadsheet Events

The Telerik Blazor Spreadsheet fires events that are related to different user actions. This article describes all events and event arguments.

* [`OnDownload`](https://www.telerik.com/blazor-ui/documentation/components/spreadsheet/events#ondownload)
* [`OnOpen`](https://www.telerik.com/blazor-ui/documentation/components/spreadsheet/events#onopen)

## OnDownload

The `OnDownload` event fires when the user clicks on the **Download** button in the Spreadsheet toolbar. The `SpreadsheetDownloadEventArgs` event argument has the following properties:

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Property Name | Type     | Description                                                        |
| ------------- | -------- | ------------------------------------------------------------------ |
| `FileName`    | `string` | The filename, which will appear in the browser's save file dialog. |
| `IsCancelled` | `bool`   | Sets if the download action will be prevented.                     |

See the [example below](https://www.telerik.com/blazor-ui/documentation/components/spreadsheet/events#example).

## OnOpen

The `OnOpen` event fires when the user clicks on the **Open** button in the Spreadsheet toolbar and opens a file for editing from their file system. The Spreadsheet uses a [FileSelect component](https://www.telerik.com/blazor-ui/documentation/components/fileselect/overview) for opening files. The Spreadsheet `OnOpen` event is similar to the [FileSelect `OnSelect` event](https://www.telerik.com/blazor-ui/documentation/components/fileselect/events#onselect).

The `SpreadsheetOpenEventArgs` argument of the `OnOpen` event has the following properties:

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Property Name | Type                       | Description                                                                                                                                                                                                                                                                                                                                                        |
| ------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Files`       | `List<FileSelectFileInfo>` | The `List` contains one member, which is the file that the user opened. Check the [`FileSelectFileInfo` section in the FileSelect Events documentation](https://www.telerik.com/blazor-ui/documentation/components/fileselect/events#fileselectfileinfo) for more information about the `FileSelectFileInfo` properties `Name`, `Size`, `Extension`, and `Stream`. |
| `IsCancelled` | `bool`                     | Sets if the open action should be prevented.                                                                                                                                                                                                                                                                                                                       |

## Example

> caption Using the Spreadsheet events

<demo metaUrl="client/spreadsheet/events/example-1/" height="770"></demo>

## See Also

* [Live Demo: Spreadsheet Events](https://demos.telerik.com/blazor-ui/spreadsheet/events)
