CellFormat

Overview

CellFormat is a class in Aspose.Words FOSS for .NET. Inherits from: IBorderAttrSource, IShadingAttrSource.

Represents all formatting for a table cell.

This class provides 2 methods for working with CellFormat objects in .NET programs. Available methods include: ClearFormatting, SetPaddings. All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package. Properties: Borders, BottomPadding, FitText, HideMark, HorizontalMerge, LeftPadding, and 9 more.

Properties

NameTypeAccessDescription
LeftPaddingdoubleRead/WriteReturns or sets the amount of space (in points) to add to the left of the contents of cell.
RightPaddingdoubleRead/WriteReturns or sets the amount of space (in points) to add to the right of the contents of cell.
TopPaddingdoubleRead/WriteReturns or sets the amount of space (in points) to add above the contents of cell.
BottomPaddingdoubleRead/WriteReturns or sets the amount of space (in points) to add below the contents of cell.
BordersBorderCollectionReadGets collection of borders of the cell.
ShadingShadingReadReturns a Shading object that refers to the shading formatting for the cell.
VerticalAlignmentCellVerticalAlignmentRead/WriteReturns or sets the vertical alignment of text in the cell.
HideMarkboolRead/WriteReturns or sets visibility of cell mark.
WidthdoubleRead/WriteGets the width of the cell in points.
PreferredWidthPreferredWidthRead/WriteReturns or sets the preferred width of the cell.
VerticalMergeCellMergeRead/WriteSpecifies how the cell is merged with other cells vertically.
HorizontalMergeCellMergeRead/WriteSpecifies how the cell is merged horizontally with other cells in the row.
OrientationTextOrientationRead/WriteReturns or sets the orientation of text in a table cell.
FitTextboolRead/WriteIf true, fits text in the cell, compressing each paragraph to the width of the cell.
WrapTextboolRead/WriteIf true, wrap text for the cell.

Methods

SignatureDescription
ClearFormatting()Resets to default cell formatting.
SetPaddings(leftPadding: double, topPadding: double, rightPadding: double, bottomPadding: double)Sets the amount of space (in points) to add to the left/top/right/bottom of the contents of cell.

See Also