ObjectCommand 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
An opaque queued operation created by a worksheet-bound handle. Add it to a WorkbookBatch.
Syntax
public class ObjectCommand
Members
| Member | Value | Description |
|---|
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);
}