diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2010-10-04 10:19:31 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2010-10-04 10:19:31 -0400 |
| commit | 333e73f892d7a61e0c4dea4bbf4d5cfd4aa9c58a (patch) | |
| tree | 976349e55e70b0931ab71d6d4f995784b5275dee /tablib | |
| parent | 6407afba3eedaf27c2614a362f0842470a8f4fae (diff) | |
| download | tablib-333e73f892d7a61e0c4dea4bbf4d5cfd4aa9c58a.tar.gz | |
Added wrapping support.
Diffstat (limited to 'tablib')
| -rw-r--r-- | tablib/formats/_xls.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tablib/formats/_xls.py b/tablib/formats/_xls.py index 1a739af..3698726 100644 --- a/tablib/formats/_xls.py +++ b/tablib/formats/_xls.py @@ -9,7 +9,7 @@ import cStringIO title = 'xls' extentions = ('xls',) - +wrap = xlwt.easyxf("alignment: wrap on") def export_set(dataset): """Returns XLS representation of Dataset.""" @@ -19,7 +19,7 @@ def export_set(dataset): for i, row in enumerate(dataset._package(dicts=False)): for j, col in enumerate(row): - ws.write(i, j, col) + ws.write(i, j, col, wrap) stream = cStringIO.StringIO() wb.save(stream) @@ -37,7 +37,7 @@ def export_book(databook): #for row in self._package(dicts=False): for i, row in enumerate(dset._package(dicts=False)): for j, col in enumerate(row): - ws.write(i, j, col) + ws.write(i, j, col, wrap) stream = cStringIO.StringIO() |
