# XlsxExportOptions.Fonts Property

> XlsxExportOptions.Fonts property in the .NET API: Font bytes and substitutions for this load or save, supplied right before LoadAsync or SaveAsync.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Property
- **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 > XlsxExportOptions > XlsxExportOptions.Fonts Property
- **586 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/xlsxexportoptions/fonts-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/xlsxexportoptions/fonts-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/xlsxexportoptions/fonts-property/llms-full.txt

---

Settings for this operation. The application can obtain font bytes immediately before calling LoadAsync or SaveAsync. JavaScript resolver delegates are not serialized into the managed transport.

### Syntax

```csharp
using TXTextControl.TXSheetControl.Server;

var fonts = new DocumentFontOptions {
    Sources = [new DocumentFontSource {
        Family = "Invoice Sans",
        Base64 = Convert.ToBase64String(await File.ReadAllBytesAsync("InvoiceSans-Regular.ttf"))
    }]
};
await control.SaveAsync("invoice.xlsx", StreamType.SpreadsheetML,
    new SaveOptions { SpreadsheetML = new XlsxExportOptions { Fonts = fonts } });
```

### Example

```csharp
using TXTextControl.TXSheetControl.Server;

static async Task ConfigureInvoiceFontsAsync(ServerSheetControl control, string fontPath)
{
    var fonts = new DocumentFontOptions {
        Sources = [new DocumentFontSource {
            Family = "Invoice Sans",
            Base64 = Convert.ToBase64String(await File.ReadAllBytesAsync(fontPath))
        }]
    };
    await control.SaveAsync("invoice.xlsx", StreamType.SpreadsheetML,
        new SaveOptions { SpreadsheetML = new XlsxExportOptions { Fonts = fonts } });
}
```

---

## Nearby

- **Previous:** [XlsxExportOptions.PreserveOriginal Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/xlsxexportoptions/preserveoriginal-property/llms-full.txt)
- **Next:** [XlsxWarning Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/xlsxwarning/llms-full.txt)
