[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.CellPadding

CellPadding Class

Represents the cell padding for a range.

Provides padding values (left, right, top, bottom) for cells. Can be created with uniform padding on all sides or with individual values for each side. This class is used with SpreadJS JSON I/O and PDF export.

Inheritance
CellPadding
Implements
Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public class CellPadding : ICellPadding
Public Class CellPadding
    Implements ICellPadding
Examples
// Uniform padding on all sides
CellPadding padding = new CellPadding(15);
worksheet.Range["A1"].CellPadding = padding;

// Different padding for each side (top, right, bottom, left)
CellPadding padding2 = new CellPadding(10, 20, 10, 20);
worksheet.Range["B1"].CellPadding = padding2;

Constructors

Name Description
CellPadding(int)

Initializes a new instance of the CellPadding class with the same value for all sides.

CellPadding(int, int, int, int)

Initializes a new instance of the CellPadding class with individual values for each side.

Properties

Name Description
Bottom

Gets the bottom cell padding.

Left

Gets the left cell padding.

Right

Gets the right cell padding.

Top

Gets the top cell padding.