Table of Contents

CadSheetCell

from OpenCAD2D import CadSheetCell

class CadSheetCell(System.Object) ยท CadSheetCell in the .NET reference

One cell of a spreadsheet as a data link reads it: its value, the words it shows (a number as its format makes it, 0.5 in the format 0% shown 50%), and, from a workbook, the few marks of its look a table takes over (CadSheetCell.Alignment, CadSheetCell.Fill and CadSheetCell.FontColor).

Constructors

__init__

.NET

def __init__(self, kind: CadSheetCellKind, text: str, number: float) -> None

Makes a cell.

Properties and fields

Alignment

.NET

@property
def Alignment(self) -> int
@Alignment.setter
def Alignment(self, value: int) -> None

Gets or sets the horizontal alignment the workbook gives the cell: 0 general, 1 left, 2 centre, 3 right.

Empty

.NET

Empty: ClassVar[CadSheetCell]

A cell with nothing in it.

Fill

.NET

@property
def Fill(self) -> int | None
@Fill.setter
def Fill(self, value: int | None) -> None

Gets or sets the fill the workbook gives the cell as 0xRRGGBB; null for none.

FontColor

.NET

@property
def FontColor(self) -> int | None
@FontColor.setter
def FontColor(self, value: int | None) -> None

Gets or sets the colour of the cell's words as 0xRRGGBB; null where the workbook gives none.

Kind

.NET

@property
def Kind(self) -> CadSheetCellKind

Gets what the cell holds.

Number

.NET

@property
def Number(self) -> float

Gets the value of a number, a date or a boolean; nought for the rest.

Text

.NET

@property
def Text(self) -> str

Gets the words the cell shows; empty for an empty cell.

Methods

OfNumber

.NET

@staticmethod
def OfNumber(value: float) -> CadSheetCell

Gives a cell of a number, shown as R shows it (12 as 12, 0.25 as 0.25).

OfText

.NET

@staticmethod
def OfText(text: str) -> CadSheetCell

Gives a cell of words.

ToString

.NET

def ToString(self) -> str

Gives the cell as a line for debugging: its words.