LoadOptions Class
- Namespace
TXTextControl.TXSheetControl. Server
- Package
TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Server
- Assembly
TXTextControl.TXSheetControl. Api. dll
- Install
dotnet add package TXTextControl..NET 10 and later.TXSheetControl. Server
- Also in
TXTextControl.asTXSheetControl. Blazor TXTextControl.TXSheetControl. Api. dll
- Derived
- Tabular
Load Options
Reusable format-specific load settings, with cancellation supplied separately per operation.
Syntax
public class LoadOptions
Members
Constructors
| Constructor | Description |
|---|---|
| Constructor |
Properties
| Property | Description |
|---|---|
| InternalWorkbookFormat | |
| SpreadsheetML |
Examples
Load an application-supplied workbook with these conversion settings, edit and format its heading, and return a PDF of the result.
using TXTextControl.TXSheetControl.Server;
async Task<byte[]> CreateConfiguredLoadOptionsReportAsync(ServerSheetControl control, byte[] originalDocument)
{
var settings = new LoadOptions();
await control.LoadAsync(originalDocument, StreamType.SpreadsheetML, settings);
var sheet = await control.Workbook.Sheets.AtAsync(0);
await sheet.Cell("A1").SetTextAsync("Reviewed invoice");
await sheet.Cell("A1").FormatAsync(new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
return await control.SaveAsync(StreamType.PDF, new SaveOptions { OmitDashboards = true });
}
See Also
OpenDocumentSpreadsheet: format-specific ODS settings.
Fonts: document font bytes and substitution policy.