Excel.ErrorCellValueType enum

表示 对象的类型 ErrorCellValue

注解

[ API 集:ExcelApi 1.16 ]

示例

// 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();
});

字段

blocked = "Blocked"

表示 BlockedErrorCellValue

busy = "Busy"

表示 BusyErrorCellValue

calc = "Calc"

表示 CalcErrorCellValue

connect = "Connect"

表示 ConnectErrorCellValue

div0 = "Div0"

表示 Div0ErrorCellValue

external = "External"

表示 ExternalErrorCellValue

field = "Field"

表示 FieldErrorCellValue

gettingData = "GettingData"

表示 GettingDataErrorCellValue

name = "Name"

表示 NameErrorCellValue

notAvailable = "NotAvailable"

表示 NotAvailableErrorCellValue

null = "Null"

表示 NullErrorCellValue

num = "Num"

表示 NumErrorCellValue

placeholder = "Placeholder"

表示 PlaceholderErrorCellValue

python = "Python"

表示 PythonErrorCellValue

ref = "Ref"

表示 RefErrorCellValue

spill = "Spill"

表示 SpillErrorCellValue

timeout = "Timeout"

表示 TimeoutErrorCellValue

value = "Value"

表示 ValueErrorCellValue