TX Sheet Control

SpreadsheetMLLoadOptions.AutoExpand Property

Property
Namespace
TXTextControl.TXSheetControl.Server
Package
TXTextControl.TXSheetControl.Server as TXTextControl.TXSheetControl.Api.dll from the private NuGet feed or the supplied NuGet folder
Also in
TXTextControl.TXSheetControl.Blazor as TXTextControl.TXSheetControl.Api.dll

Syntax

public bool? AutoExpand { get; init; }

Property Value

bool?.

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[]> CreateConfiguredSpreadsheetMLLoadOptionsAutoExpandAsync(ServerSheetControl control, byte[] originalDocument)
{
    var settings = new SpreadsheetMLLoadOptions()
    {
        AutoExpand = true
    };

    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 });
}

Remarks

Use the member with an instance or settings object from the documented package. Await task-returning operations. Document-bound handles must be resolved again after loading or deleting their owner.

See Also