TX Sheet Control

NativeLoadOptions Class

Class
Namespace
TXTextControl.TXSheetControl.Server
Package
TXTextControl.TXSheetControl.Server from the private NuGet feed or the supplied NuGet folder
Assembly
TXTextControl.TXSheetControl.Api.dll
Install
dotnet add package TXTextControl.TXSheetControl.Server .NET 10 and later.
Also in
TXTextControl.TXSheetControl.Blazor as TXTextControl.TXSheetControl.Api.dll

Reusable native package budgets in bytes/counts; all unknown entries receive the same limits.

Syntax

public class NativeLoadOptions

Members

Constructors

ConstructorDescription
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[]> CreateConfiguredNativeLoadOptionsReportAsync(ServerSheetControl control, byte[] originalDocument)
{
    var settings = new NativeLoadOptions();
    await control.LoadAsync(originalDocument, StreamType.InternalWorkbookFormat, new LoadOptions { InternalWorkbookFormat = 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