diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2010-10-04 15:52:43 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2010-10-04 15:52:43 -0400 |
| commit | 930d38cf5abcebe021f3dc0bc95d15533fbb9a46 (patch) | |
| tree | b80a6d2061dc1d03da0ddce1eb9e416a4dfe7f6e /tablib | |
| parent | 520a1986d72f4baad3607911db0023967e1b9246 (diff) | |
| parent | 5e433c263d2c7ca333503f45c54430bb2ff014da (diff) | |
| download | tablib-0.8.4.tar.gz | |
Merge branch 'release/0.8.4'v0.8.4
Diffstat (limited to 'tablib')
| -rw-r--r-- | tablib/core.py | 4 | ||||
| -rw-r--r-- | tablib/formats/_xls.py | 8 |
2 files changed, 9 insertions, 3 deletions
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 |
