Skip to content

Commit 5a05472

Browse files
committed
update validation.rst
1 parent dc03276 commit 5a05472

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

validation.rst

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Validating cells
1+
数据验证
22
================
33

4-
Data validators can be applied to ranges of cells but are not enforced or evaluated. Ranges do not have to be contiguous: eg. "A1 B2:B5" is contains A1 and the cells B2 to B5 but not A2 or B2.
4+
数据验证器可以应用于范围单元格,但也不是强制和evaluated。范围不必是连续的:例如 “ A1 B2:B5”包含A1和单元格B2至B5,但不包含A2或B2。
55

66

7-
Examples
7+
例子
88
--------
99

1010
.. :: doctest
@@ -48,62 +48,62 @@ True
4848

4949
.. note ::
5050
51-
Validations without any cell ranges will be ignored when saving a workbook.
51+
没有在任何单元格应用的验证将会在保存的时候被忽略。
5252
53-
Other validation examples
53+
其他验证的例子
5454
-------------------------
5555

56-
Any whole number:
56+
任何证书:
5757
::
5858

5959
dv = DataValidation(type="whole")
6060

61-
Any whole number above 100:
61+
任何大于100的整数:
6262
::
6363

6464
dv = DataValidation(type="whole",
6565
operator="greaterThan",
6666
formula1=100)
6767

68-
Any decimal number:
68+
任何小数:
6969
::
7070

7171
dv = DataValidation(type="decimal")
7272

73-
Any decimal number between 0 and 1:
73+
任何在0至1之间的小数:
7474
::
7575

7676
dv = DataValidation(type="decimal",
7777
operator="between",
7878
formula1=0,
7979
formula2=1)
8080

81-
Any date:
81+
任何日期:
8282
::
8383

8484
dv = DataValidation(type="date")
8585

86-
or time:
86+
时间:
8787
::
8888

8989
dv = DataValidation(type="time")
9090

91-
Any string at most 15 characters:
91+
15长度以下的文本:
9292
::
9393

9494
dv = DataValidation(type="textLength",
9595
operator="lessThanOrEqual"),
9696
formula1=15)
9797

98-
Cell range validation:
98+
序列:
9999
::
100100

101101
from openpyxl.utils import quote_sheetname
102102
dv = DataValidation(type="list",
103103
formula1="{0}!$B$1:$B$10".format(quote_sheetname(sheetname))
104104
)
105105

106-
Custom rule:
106+
自定义规则:
107107
::
108108

109109
dv = DataValidation(type="custom",

0 commit comments

Comments
 (0)