diff --git a/pyexcel_ods.yaml b/pyexcel_ods.yaml index f0faac2..2993b38 100644 --- a/pyexcel_ods.yaml +++ b/pyexcel_ods.yaml @@ -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 diff --git a/pyexcel_ods/odsr.py b/pyexcel_ods/odsr.py index d636b5c..a76a2f3 100644 --- a/pyexcel_ods/odsr.py +++ b/pyexcel_ods/odsr.py @@ -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) diff --git a/requirements.txt b/requirements.txt index 61e8b85..f2d1c2a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ pyexcel-io>=0.5.3 -odfpy>=1.3.3 +odfpy==1.3.5 diff --git a/setup.py b/setup.py index e135de3..78bbbc9 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ CLASSIFIERS = [ INSTALL_REQUIRES = [ 'pyexcel-io>=0.5.3', - 'odfpy>=1.3.3', + 'odfpy==1.3.5', ] SETUP_COMMANDS = {} diff --git a/tests/test_bug_fixes.py b/tests/test_bug_fixes.py index a723b35..cedfe3d 100644 --- a/tests/test_bug_fixes.py +++ b/tests/test_bug_fixes.py @@ -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):