openpyxl.worksheet.datavalidation module¶
-
class
openpyxl.worksheet.datavalidation.DataValidation(type=None, formula1=None, formula2=None, allow_blank=False, showErrorMessage=True, showInputMessage=True, showDropDown=None, allowBlank=None, sqref=None, promptTitle=None, errorStyle=None, error=None, prompt=None, errorTitle=None, imeMode=None, operator=None)[source]¶ Bases:
openpyxl.descriptors.serialisable.Serialisable-
allowBlank¶ Values must be of type <type ‘bool’>
-
allow_blank¶ Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)
-
error¶ Values must be of type <type ‘basestring’>
-
errorStyle¶ Value must be one of set([‘information’, ‘warning’, ‘stop’])
-
errorTitle¶ Values must be of type <type ‘basestring’>
-
formula1¶ Values must be of type <type ‘unicode’>
-
formula2¶ Values must be of type <type ‘unicode’>
-
hide_drop_down¶ Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)
-
imeMode¶ Value must be one of set([‘on’, ‘off’, ‘noControl’, ‘halfHangul’, ‘disabled’, ‘hiragana’, ‘fullHangul’, ‘fullKatakana’, ‘fullAlpha’, ‘halfKatakana’, ‘halfAlpha’])
-
operator¶ Value must be one of set([‘notEqual’, ‘notBetween’, ‘lessThanOrEqual’, ‘equal’, ‘lessThan’, ‘greaterThan’, ‘between’, ‘greaterThanOrEqual’])
-
prompt¶ Values must be of type <type ‘basestring’>
-
promptTitle¶ Values must be of type <type ‘basestring’>
-
showDropDown¶ Values must be of type <type ‘bool’>
-
showErrorMessage¶ Values must be of type <type ‘bool’>
-
showInputMessage¶ Values must be of type <type ‘bool’>
-
sqref¶
-
tagname= 'dataValidation'¶
-
type¶ Value must be one of set([‘textLength’, ‘decimal’, ‘list’, ‘custom’, ‘time’, ‘date’, ‘whole’])
-
validation_type¶ Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)
-
-
class
openpyxl.worksheet.datavalidation.DataValidationList(disablePrompts=None, xWindow=None, yWindow=None, count=None, dataValidation=())[source]¶ Bases:
openpyxl.descriptors.serialisable.Serialisable-
count¶
-
dataValidation¶ A sequence (list or tuple) that may only contain objects of the declared type
-
disablePrompts¶ Values must be of type <type ‘bool’>
-
tagname= 'dataValidations'¶
-
xWindow¶ Values must be of type <type ‘long’>
-
yWindow¶ Values must be of type <type ‘long’>
-
-
openpyxl.worksheet.datavalidation.collapse_cell_addresses(cells, input_ranges=())[source]¶ Collapse a collection of cell co-ordinates down into an optimal range or collection of ranges.
E.g. Cells A1, A2, A3, B1, B2 and B3 should have the data-validation object applied, attempt to collapse down to a single range, A1:B3.
Currently only collapsing contiguous vertical ranges (i.e. above example results in A1:A3 B1:B3).