diff options
| -rw-r--r-- | HISTORY.rst | 7 | ||||
| -rw-r--r-- | setup.py | 2 | ||||
| -rw-r--r-- | tablib/core.py | 4 | ||||
| -rw-r--r-- | tablib/formats/_xls.py | 8 |
4 files changed, 17 insertions, 4 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index 350cb6f..b9a862d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,5 +1,10 @@ History ======= +0.8.4 (2010-10-04) +------------------ + +* Upated XLS output: Only wrap if '\n' in cell. + 0.8.3 (2010-10-04) ------------------ @@ -10,9 +15,11 @@ History 0.8.2 (2010-10-04) ------------------ + * Added alignment wrapping to written cells. * Added separator support to XLS. + 0.8.1 (2010-09-28) ------------------ * Packaging Fix @@ -17,7 +17,7 @@ if sys.argv[-1] == "publish": setup( name='tablib', - version='0.8.3', + version='0.8.4', description='Format agnostic tabular data library (XLS, JSON, YAML, CSV)', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(), diff --git a/tablib/core.py b/tablib/core.py index 69e7549..aa840ad 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -7,8 +7,8 @@ from tablib.formats import FORMATS as formats __title__ = 'tablib' -__version__ = '0.8.3' -__build__ = 0x000803 +__version__ = '0.8.4' +__build__ = 0x000804 __author__ = 'Kenneth Reitz' __license__ = 'MIT' __copyright__ = 'Copyright 2010 Kenneth Reitz' diff --git a/tablib/formats/_xls.py b/tablib/formats/_xls.py index 76e9318..0e989a7 100644 --- a/tablib/formats/_xls.py +++ b/tablib/formats/_xls.py @@ -9,9 +9,12 @@ import cStringIO title = 'xls' extentions = ('xls',) + +# special styles wrap = xlwt.easyxf("alignment: wrap on") bold = xlwt.easyxf("font: bold on") + def export_set(dataset): """Returns XLS representation of Dataset.""" @@ -62,6 +65,9 @@ def dset_sheet(dataset, ws): # wrap the rest else: - ws.write(i, j, col, wrap) + if '\n' in col: + ws.write(i, j, col, wrap) + else: + ws.write(i, j, col)
\ No newline at end of file |
