🐛 exception when the type of currency is missing. fix #27
This commit is contained in:
parent
f4f4f51884
commit
2b339183ef
|
@ -7,5 +7,5 @@ release: 0.5.2
|
|||
file_type: ods
|
||||
dependencies:
|
||||
- pyexcel-io>=0.5.3
|
||||
- odfpy>=1.3.3
|
||||
- odfpy==1.3.5
|
||||
description: A wrapper library to read, manipulate and write data in ods format
|
||||
|
|
|
@ -69,7 +69,10 @@ class ODSSheet(SheetReader):
|
|||
elif cell_type == "currency":
|
||||
value = cell.getAttrNS(OFFICENS, value_token)
|
||||
currency = cell.getAttrNS(OFFICENS, cell_type)
|
||||
ret = value + ' ' + currency
|
||||
if currency:
|
||||
ret = value + ' ' + currency
|
||||
else:
|
||||
ret = value
|
||||
else:
|
||||
if cell_type in service.VALUE_CONVERTERS:
|
||||
value = cell.getAttrNS(OFFICENS, value_token)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
pyexcel-io>=0.5.3
|
||||
odfpy>=1.3.3
|
||||
odfpy==1.3.5
|
||||
|
|
2
setup.py
2
setup.py
|
@ -36,7 +36,7 @@ CLASSIFIERS = [
|
|||
|
||||
INSTALL_REQUIRES = [
|
||||
'pyexcel-io>=0.5.3',
|
||||
'odfpy>=1.3.3',
|
||||
'odfpy==1.3.5',
|
||||
]
|
||||
SETUP_COMMANDS = {}
|
||||
|
||||
|
|
|
@ -134,10 +134,10 @@ def test_issue_24():
|
|||
eq_(data['Sheet1'], [['test']])
|
||||
|
||||
|
||||
def test_issue_25():
|
||||
test_file = get_fixtures("comment-in-cell.ods")
|
||||
data = get_data(test_file)
|
||||
print(data)
|
||||
def test_issue_27():
|
||||
test_file = get_fixtures("issue_27.ods")
|
||||
data = get_data(test_file, skip_empty_rows=True)
|
||||
eq_(data['VGPMX'], [['', 'Cost Basis', '0']])
|
||||
|
||||
|
||||
def get_fixtures(filename):
|
||||
|
|
Loading…
Reference in New Issue