TX Sheet Control

ObjectCommand 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

An opaque queued operation created by a worksheet-bound handle. Add it to a WorkbookBatch.

Syntax

public class ObjectCommand

Members

MemberValueDescription

Examples

Create a working document workflow using ObjectCommand. Return the generated document or application data to the caller.

using TXTextControl.TXSheetControl.Server;

async Task<byte[]> BuildObjectCommandExampleAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    DocumentObject heading = sheet.Cell("A1");
    ObjectCommand text = heading.Command("setText", "October invoice");
    ObjectCommand format = heading.Command("format", new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
    await book.BatchAsync(batch => { batch.Add(text); batch.Add(format); });
    return await control.SaveAsync(StreamType.PDF);
}

See Also