-
Notifications
You must be signed in to change notification settings - Fork 2
/
excelscript.datavalidationrule.yml
103 lines (103 loc) · 4.82 KB
/
excelscript.datavalidationrule.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
### YamlMime:TSType
name: ExcelScript.DataValidationRule
uid: ExcelScript!ExcelScript.DataValidationRule:interface
package: ExcelScript!
fullName: ExcelScript.DataValidationRule
summary: Eine Datenüberprüfungsregel enthält verschiedene Arten von Datenüberprüfungen. Sie können jeweils nur eine davon verwenden, entsprechend der `ExcelScript.DataValidationType`<!-- -->.
remarks: ''
isPreview: false
isDeprecated: false
type: interface
properties:
- name: custom
uid: ExcelScript!ExcelScript.DataValidationRule#custom:member
package: ExcelScript!
fullName: custom
summary: Kriterien für eine benutzerdefinierte Datenüberprüfung.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'custom?: CustomDataValidation;'
return:
type: <xref uid="ExcelScript!ExcelScript.CustomDataValidation:interface" />
- name: date
uid: ExcelScript!ExcelScript.DataValidationRule#date:member
package: ExcelScript!
fullName: date
summary: Kriterien für die Datenüberprüfung.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'date?: DateTimeDataValidation;'
return:
type: <xref uid="ExcelScript!ExcelScript.DateTimeDataValidation:interface" />
- name: decimal
uid: ExcelScript!ExcelScript.DataValidationRule#decimal:member
package: ExcelScript!
fullName: decimal
summary: Kriterien für die dezimale Datenüberprüfung.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'decimal?: BasicDataValidation;'
return:
type: <xref uid="ExcelScript!ExcelScript.BasicDataValidation:interface" />
- name: list
uid: ExcelScript!ExcelScript.DataValidationRule#list:member
package: ExcelScript!
fullName: list
summary: Führt die Kriterien für die Datenüberprüfung auf.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'list?: ListDataValidation;'
return:
type: <xref uid="ExcelScript!ExcelScript.ListDataValidation:interface" />
- name: textLength
uid: ExcelScript!ExcelScript.DataValidationRule#textLength:member
package: ExcelScript!
fullName: textLength
summary: Datenüberprüfungskriterien für die Textlänge.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'textLength?: BasicDataValidation;'
return:
type: <xref uid="ExcelScript!ExcelScript.BasicDataValidation:interface" />
- name: time
uid: ExcelScript!ExcelScript.DataValidationRule#time:member
package: ExcelScript!
fullName: time
summary: Kriterien für die Zeitdatenüberprüfung.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'time?: DateTimeDataValidation;'
return:
type: <xref uid="ExcelScript!ExcelScript.DateTimeDataValidation:interface" />
- name: wholeNumber
uid: ExcelScript!ExcelScript.DataValidationRule#wholeNumber:member
package: ExcelScript!
fullName: wholeNumber
summary: Gültigkeitsprüfungskriterien für ganze Zahlen.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'wholeNumber?: BasicDataValidation;'
return:
type: <xref uid="ExcelScript!ExcelScript.BasicDataValidation:interface" />
description: "\n\n#### <a name=\"examples\"></a>Beispiele\n\n```TypeScript\n/**\n * This script creates a data validation rule for the range B1:B5.\n * All values in that range must be a positive number.\n * Attempts to enter other values are blocked and an error message appears.\n */\nfunction main(workbook: ExcelScript.Workbook) {\n // Get the range B1:B5 in the active worksheet.\n const currentSheet = workbook.getActiveWorksheet();\n const positiveNumberOnlyCells = currentSheet.getRange(\"B1:B5\");\n\n // Create a data validation rule to only allow positive numbers.\n const positiveNumberValidation: ExcelScript.BasicDataValidation = {\n formula1: \"0\",\n operator: ExcelScript.DataValidationOperator.greaterThan\n };\n const positiveNumberOnlyRule: ExcelScript.DataValidationRule = {\n wholeNumber: positiveNumberValidation\n };\n\n // Set the rule on the range.\n const rangeDataValidation = positiveNumberOnlyCells.getDataValidation();\n rangeDataValidation.setRule(positiveNumberOnlyRule);\n\n // Create an alert to appear when data other than positive numbers are entered.\n const positiveNumberOnlyAlert: ExcelScript.DataValidationErrorAlert = {\n message: \"Positive numbers only\",\n showAlert: true,\n style: ExcelScript.DataValidationAlertStyle.stop,\n title: \"Invalid data\"\n };\n rangeDataValidation.setErrorAlert(positiveNumberOnlyAlert);\n}\n```"
metadata:
ms.openlocfilehash: 20df56e868446c6e59ea9e5a1396a4a456868a59
ms.sourcegitcommit: f004fc5d3ebfc650a5a353e05f1d75c2bc330f09
ms.translationtype: MT
ms.contentlocale: de-DE
ms.lasthandoff: 10/26/2022
ms.locfileid: "68698187"