-
Notifications
You must be signed in to change notification settings - Fork 63
/
excel.errorcellvalue.yml
45 lines (34 loc) · 1.53 KB
/
excel.errorcellvalue.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
### YamlMime:TSTypeAlias
name: Excel.ErrorCellValue
uid: 'excel!Excel.ErrorCellValue:type'
package: excel!
fullName: Excel.ErrorCellValue
summary: Represents a cell value which contains an error.
remarks: >-
\[ [API set: ExcelApi 1.16](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// 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();
});
```
isPreview: false
isDeprecated: false
syntax: >-
export type ErrorCellValue = BlockedErrorCellValue | BusyErrorCellValue | CalcErrorCellValue | ConnectErrorCellValue |
Div0ErrorCellValue | ExternalErrorCellValue | FieldErrorCellValue | GettingDataErrorCellValue |
NotAvailableErrorCellValue | NameErrorCellValue | NullErrorCellValue | NumErrorCellValue | PlaceholderErrorCellValue |
RefErrorCellValue | SpillErrorCellValue | ValueErrorCellValue;