SpreadsheetMLLoadOptions 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
Reusable XLSX package and projection budgets; byte limits apply before expanding archive data.
Syntax
public class SpreadsheetMLLoadOptions
Members
Constructors
| Constructor | Description |
|---|---|
| Constructor |
Properties
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[]> CreateConfiguredSpreadsheetMLLoadOptionsReportAsync(ServerSheetControl control, byte[] originalDocument)
{
var settings = new SpreadsheetMLLoadOptions();
await control.LoadAsync(originalDocument, StreamType.SpreadsheetML, new LoadOptions { 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 });
}