Conditionnal formatting is assuming that values are int.
Created originally on Bitbucket by mgueydan (Mathieu Gueydan)
In openpyxl / openpyxl / formatting / rule.py , on line 31 One may find this :
#!python
val = Integer(allow_none=True)
But, when I open an xslx file, I may find this :
Loading one of those files with openpyxl induce this kind of trace:
#!python
expected <class 'float'>
Traceback (most recent call last):
File "Lib\openpyxl\descriptors\base.py", line 55, in _convert
ValueError: could not convert string to float: '($Z$17*100)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "./DOFormat\entryPoint.py", line 61, in generateTree
backlog += AEBTFuncTree2Xls().generate("c:\\tmp\\template.xlsx", outputfilepath+".xlsx", tupleRoot)
File "./DOFormat\aebtFuncTree2Xls.py", line 15, in generate
wb = load_workbook(outputfilepath)
File "Lib\openpyxl\reader\excel.py", line 233, in load_workbook
File "Lib\openpyxl\reader\worksheet.py", line 104, in parse
File "Lib\openpyxl\reader\worksheet.py", line 267, in parser_conditional_formatting
File "Lib\openpyxl\descriptors\serialisable.py", line 65, in from_tree
File "Lib\openpyxl\descriptors\serialisable.py", line 65, in from_tree
File "Lib\openpyxl\descriptors\serialisable.py", line 78, in from_tree
File "Lib\openpyxl\formatting\rule.py", line 42, in __init__
File "Lib\openpyxl\descriptors\base.py", line 67, in __set__
File "Lib\openpyxl\descriptors\base.py", line 57, in _convert
TypeError: expected <class 'float'>