From 6f7c64eb03b80f4bff2d44e13b6e0cd19749967d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 30 Aug 2010 05:18:22 -0400 Subject: [PATCH] Better xlwt handling. --- tablib/core.py | 4 +--- tablib/packages/xlwt/__init__.py | 2 -- tablib/tests/tests.py | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tablib/core.py b/tablib/core.py index 9404703..2e86cb4 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -167,9 +167,7 @@ class Dataset(object): for j, col in enumerate(row): ws.write(i, j, col) - doc = xlwt.CompoundDoc.XlsDoc() - doc.save(stream, wb.get_biff_data()) - + wb.save(stream) return stream.getvalue() diff --git a/tablib/packages/xlwt/__init__.py b/tablib/packages/xlwt/__init__.py index 5053413..6f2a1b5 100644 --- a/tablib/packages/xlwt/__init__.py +++ b/tablib/packages/xlwt/__init__.py @@ -14,5 +14,3 @@ from Column import Column from Formatting import Font, Alignment, Borders, Pattern, Protection from Style import XFStyle, easyxf from ExcelFormula import * - -import CompoundDoc diff --git a/tablib/tests/tests.py b/tablib/tests/tests.py index 187fb27..89d9a9c 100644 --- a/tablib/tests/tests.py +++ b/tablib/tests/tests.py @@ -21,6 +21,6 @@ data.append(['kenneth' ,'reitz', 4.3]) data.headers = None #print data.csv -print data.xls +print len(data.xls) #print data.yaml #print data.json \ No newline at end of file