ExcelScript.SpecialCellValueType enum

Remarks

Examples

/**
 * This script finds and bolds the text of cells containing strings (not numbers or formulas).
 */
function main(workbook: ExcelScript.Workbook) {
  // Get the used range on the current sheet.
  const currentSheet = workbook.getActiveWorksheet();
  const usedRange = currentSheet.getUsedRange();

  // Get the RangeAreas object for each cell with only text.
  const textCells = usedRange.getSpecialCells(
    ExcelScript.SpecialCellType.constants, 
    ExcelScript.SpecialCellValueType.text);

  // Bold the text of those cells.
  textCells.getFormat().getFont().setBold(true);
}

Fields

all

Cells that have errors, boolean, numeric, or string values.

errors

Cells that have errors.

errorsLogical

Cells that have errors or boolean values.

errorsLogicalNumber

Cells that have errors, boolean, or numeric values.

errorsLogicalText

Cells that have errors, boolean, or string values.

errorsNumbers

Cells that have errors or numeric values.

errorsNumberText

Cells that have errors, numeric, or string values.

errorsText

Cells that have errors or string values.

logical

Cells that have a boolean value.

logicalNumbers

Cells that have a boolean or numeric value.

logicalNumbersText

Cells that have a boolean, numeric, or string value.

logicalText

Cells that have a boolean or string value.

numbers

Cells that have a numeric value.

numbersText

Cells that have a numeric or string value.

text

Cells that have a string value.