Compartilhar via


Excel.CellValueType enum

Representa os tipos do CellValue objeto.

Comentários

[ Conjunto de API: ExcelApi 1.16 ]

Exemplos

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

Campos

array = "Array"

Representa um ArrayCellValue.

boolean = "Boolean"

Representa um BooleanCellValue.

double = "Double"

Representa um DoubleCellValue.

empty = "Empty"

Representa um EmptyCellValue.

entity = "Entity"

Representa um EntityCellValue.

error = "Error"

Representa um ErrorCellValue.

externalCodeServiceObject = "ExternalCodeServiceObject"

Representa um ExternalCodeServiceObjectCellValue.

formattedNumber = "FormattedNumber"

Representa um FormattedNumberCellValue.

linkedEntity = "LinkedEntity"

Representa um LinkedEntityCellValue.

localImage = "LocalImage"

Representa um LocalImageCellValue.

notAvailable = "NotAvailable"

Representa um ValueTypeNotAvailableCellValue.

reference = "Reference"

Representa um ReferenceCellValue.

string = "String"

Representa um StringCellValue.

webImage = "WebImage"

Representa um WebImageCellValue.