# spreadsheet-editor-formula

> Spreadsheet editor loaded with a formula workbook from a byte payload.

**Framework:** blazor  **Component:** Spreadsheet  **Variant:** formula

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/blazor/spreadsheet-editor-formula.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.Blazor.Spreadsheet
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/spreadsheet-editor-formula/SpreadSheetEditor.razor

```razor
@page "/spreadsheet/formula"
@namespace blazor.Components.Pages.Formula.Formula
@using Syncfusion.Blazor.Spreadsheet
@using System;
@using System.IO;
@inject IWebHostEnvironment Environment
<div class="col-lg-12 control-section">
    <div class="content-wrapper">
        <div class="row">
            <div>
                <SfSpreadsheet DataSource="DataSourceBytes">
                </SfSpreadsheet>
            </div>
        </div>
    </div>
</div>
@code {
   public byte[] DataSourceBytes { get; set; } = Array.Empty<byte>();
    protected override void OnInitialized()
    {
        //Sets the excel file path for initial loading.
        string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "src", "blazor", "spreadsheet-editor", "formula", "formula.xlsx");
        DataSourceBytes = File.ReadAllBytes(filePath);
    }
}
```
