Excel.ErrorCellValueType enum

Represents the types of the ErrorCellValue object.

Remarks

[ API set: ExcelApi 1.16 ]

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-error-values.yaml

// This function sets the value of cell A1 to a #BUSY! error using data types.
await Excel.run(async (context) => {
  // Retrieve the Sample worksheet and cell A1 on that sheet.
  const sheet = context.workbook.worksheets.getItemOrNullObject("Sample");
  const range = sheet.getRange("A1");

  // Get the error data type and set its type to `busy`.
  const error: Excel.ErrorCellValue = {
    type: Excel.CellValueType.error,
    errorType: Excel.ErrorCellValueType.busy
  };

  // Set cell A1 as the busy error.
  range.valuesAsJson = [[error]];
  await context.sync();
});

Fields

blocked = "Blocked"

Represents a BlockedErrorCellValue.

busy = "Busy"

Represents a BusyErrorCellValue.

calc = "Calc"

Represents a CalcErrorCellValue.

connect = "Connect"

Represents a ConnectErrorCellValue.

div0 = "Div0"

Represents a Div0ErrorCellValue.

external = "External"

Represents an ExternalErrorCellValue.

field = "Field"

Represents a FieldErrorCellValue.

gettingData = "GettingData"

Represents a GettingDataErrorCellValue.

name = "Name"

Represents a NameErrorCellValue.

notAvailable = "NotAvailable"

Represents a NotAvailableErrorCellValue.

null = "Null"

Represents a NullErrorCellValue.

num = "Num"

Represents a NumErrorCellValue.

placeholder = "Placeholder"

Represents a PlaceholderErrorCellValue.

python = "Python"

Represents a PythonErrorCellValue.

ref = "Ref"

Represents a RefErrorCellValue.

spill = "Spill"

Represents a SpillErrorCellValue.

timeout = "Timeout"

Represents a TimeoutErrorCellValue.

value = "Value"

Represents a ValueErrorCellValue.