Class $.wijmo.wijspread.Cell
Constructor Attributes | Constructor Name and Description |
---|---|
$.wijmo.wijspread.Cell(sheet, row, col, sheetArea)
Represents a cell in a sheet.
|
Method Attributes | Method Name and Description |
---|---|
backColor(value)
Gets or sets the background color for the cell.
|
|
borderBottom(value)
Gets or sets the bottom border of the cell.
|
|
borderLeft(value)
Gets or sets the left border of the cell.
|
|
borderRight(value)
Gets or sets the right border of the cell.
|
|
borderTop(value)
Gets or sets the top border of the cell.
|
|
clearStyleProperty(propertyName)
Clears the setting for the specified property.
|
|
dataValidator(value)
Gets or sets the data validator for the cell.
|
|
font(value)
Gets or sets the font for the cell.
|
|
foreColor(value)
Gets or sets the color of the text in the cell.
|
|
formatter(value)
Gets or sets the formatter for the cell.
|
|
formula(value)
Gets or sets the formula for the cell.
|
|
hAlign(value)
Gets or sets the horizontal alignment of the contents of the cell.
|
|
locked(value)
Gets or sets whether the cell is locked.
|
|
shrinkToFit(value)
Gets or sets whether the cell shrinks the text to fit the cell size.
|
|
text(value)
Gets or sets the formatted text for the cell.
|
|
textIndent(value)
Gets or sets the text indent of the cell.
|
|
themeFont(value)
Gets or sets the theme font for the cell.
|
|
vAlign(value)
Gets or sets the vertical alignment of the contents of the cell.
|
|
value(value)
The unformatted value of the cell.
|
|
wordWrap(value)
Gets or sets whether the cell lets text wrap.
|
Class Detail
$.wijmo.wijspread.Cell(sheet, row, col, sheetArea)
Represents a cell in a sheet.
- Parameters:
- {$.wijmo.wijspread.Sheet} sheet
- The sheet that contains this cell.
- {number} row
- The row index of the cell.
- {number} col
- The column index of the cell.
- {$.wijmo.wijspread.SheetArea} sheetArea
- The sheet area. If you do not provide this parameter, it will default to viewport.
Method Detail
{string}
backColor(value)
Gets or sets the background color for the cell.
activeSheet.getCell(1,1).backColor("lightgreen");
- Parameters:
- {string} value
- The cell background color.
- Returns:
- {string} The cell background color.
{$.wijmo.wijspread.LineBorder}
borderBottom(value)
Gets or sets the bottom border of the cell.
activeSheet.getCell(1,1).borderBottom(new $.wijmo.wijspread.$.wijmo.wijspread.LineBorder("red", $.wijmo.wijspread.UI.LineStyle.double));
- Parameters:
- {$.wijmo.wijspread.LineBorder} value
- The cell bottom border line.
- Returns:
- {$.wijmo.wijspread.LineBorder} The cell bottom border line.
{$.wijmo.wijspread.LineBorder}
borderLeft(value)
Gets or sets the left border of the cell.
activeSheet.getCell(1,1).borderLeft(new $.wijmo.wijspread.$.wijmo.wijspread.LineBorder("red", $.wijmo.wijspread.UI.LineStyle.double));
- Parameters:
- {$.wijmo.wijspread.LineBorder} value
- The cell left border line.
- Returns:
- {$.wijmo.wijspread.LineBorder} The cell left border line.
{$.wijmo.wijspread.LineBorder}
borderRight(value)
Gets or sets the right border of the cell.
activeSheet.getCell(1,1).borderRight(new $.wijmo.wijspread.$.wijmo.wijspread.LineBorder("red", $.wijmo.wijspread.UI.LineStyle.double));
- Parameters:
- {$.wijmo.wijspread.LineBorder} value
- The cell right border line.
- Returns:
- {$.wijmo.wijspread.LineBorder} The cell right border line.
{$.wijmo.wijspread.LineBorder}
borderTop(value)
Gets or sets the top border of the cell.
activeSheet.getCell(1,1).borderTop(new $.wijmo.wijspread.$.wijmo.wijspread.LineBorder("red", $.wijmo.wijspread.UI.LineStyle.double));
- Parameters:
- {$.wijmo.wijspread.LineBorder} value
- The cell top border line.
- Returns:
- {$.wijmo.wijspread.LineBorder} The cell top border line.
clearStyleProperty(propertyName)
Clears the setting for the specified property.
- Parameters:
- {string} propertyName
- The property name.
{$.wijmo.wijspread.DefaultDataValidator}
dataValidator(value)
Gets or sets the data validator for the cell.
- Parameters:
- {$.wijmo.wijspread.DefaultDataValidator} value
- The cell data validator.
- Returns:
- {$.wijmo.wijspread.DefaultDataValidator} The cell data validator.
{string}
font(value)
Gets or sets the font for the cell.
activeSheet.getCell(1,1).font("8pt Arial");
- Parameters:
- {string} value
- The cell font.
- Returns:
- {string} The cell font.
{string}
foreColor(value)
Gets or sets the color of the text in the cell.
activeSheet.getCell(1,1).foreColor("red");
- Parameters:
- {string} value
- The color of the text.
- Returns:
- {string} The cell foreground color.
{string}
formatter(value)
Gets or sets the formatter for the cell.
activeSheet.getCell(1,1).formatter("0.000%");
- Parameters:
- {string} value
- The cell formatter.
- Returns:
- {string} The cell formatter.
{string}
formula(value)
Gets or sets the formula for the cell.
- Parameters:
- {string} value
- The cell formula.
- Returns:
- {string} The cell formula.
{$.wijmo.wijspread.HorizontalAlign}
hAlign(value)
Gets or sets the horizontal alignment of the contents of the cell.
activeSheet.getCell(1,1).hAlign($.wijmo.wijspread.$.wijmo.wijspread.HorizontalAlign.center);
- Parameters:
- {$.wijmo.wijspread.HorizontalAlign} value
- The horizontal alignment.
- Returns:
- {$.wijmo.wijspread.HorizontalAlign} The horizontal alignment of the contents of the cell.
{boolean}
locked(value)
Gets or sets whether the cell is locked.
activeSheet.getCell(1,1).locked(true);
- Parameters:
- {boolean} value
- Set to true to lock the cell.
- Returns:
- {boolean} true if the cell is locked; otherwise, false.
{boolean}
shrinkToFit(value)
Gets or sets whether the cell shrinks the text to fit the cell size.
activeSheet.getCell(1,1).shrinkToFit(true);
- Parameters:
- {boolean} value
- Set to true to have the cell shrink text to fit.
- Returns:
- {boolean} true if the cell shrinks text to fit; otherwise, false.
{string}
text(value)
Gets or sets the formatted text for the cell.
activeSheet.getCell(1,1).text("cell object");
- Parameters:
- {string} value
- The cell text.
- Returns:
- {string} The formatted text in the cell.
{number}
textIndent(value)
Gets or sets the text indent of the cell.
activeSheet.getCell(1,1).textIndent(3);
- Parameters:
- {number} value
- The cell text indent.
- Returns:
- {number} The cell text indent.
{string}
themeFont(value)
Gets or sets the theme font for the cell.
sheet.getCell(3, 3).backColor("Background 1"); sheet.getCell(3, 4).backColor("Text 1"); sheet.getCell(3, 5).backColor("Background 2"); sheet.getCell(3, 6).backColor("Text 2"); sheet.getCell(3, 7).backColor("Accent 1"); sheet.getCell(3, 8).backColor("Accent 2"); sheet.getCell(3, 9).backColor("Accent 3"); sheet.getCell(3, 10).backColor("Accent 4"); sheet.getCell(3, 11).backColor("Accent 5"); sheet.getCell(3, 12).backColor("Accent 6"); sheet.getCell(5, 1).themeFont("Body");
- Parameters:
- {string} value
- The cell's theme font.
- Returns:
- {string} The cell's theme font.
{$.wijmo.wijspread.VerticalAlign}
vAlign(value)
Gets or sets the vertical alignment of the contents of the cell.
activeSheet.getCell(1,1).vAlign($.wijmo.wijspread.$.wijmo.wijspread.VerticalAlign.center);
- Parameters:
- {$.wijmo.wijspread.VerticalAlign} value
- The vertical alignment.
- Returns:
- {$.wijmo.wijspread.VerticalAlign} The vertical alignment of the contents of the cell.
{object}
value(value)
The unformatted value of the cell.
activeSheet.getCell(1,1).value(10);
- Parameters:
- {object} value
- The cell value.
- Returns:
- {object} The cell value.
{boolean}
wordWrap(value)
Gets or sets whether the cell lets text wrap.
activeSheet.getCell(1,1).wordWrap(true);
- Parameters:
- {boolean} value
- Set to true to let text wrap within the cell.
- Returns:
- {boolean} true if the text can wrap within the cell; otherwise, false.