Skip to content

Commit ae20c51

Browse files
committed
document hidden keywords, pyexcel/pyexcel#17
1 parent c8e6377 commit ae20c51

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

pyexcel_xls/__init__.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,20 @@ class XLWriter(BookWriter):
198198
"""
199199
xls, xlsx and xlsm writer
200200
"""
201-
def __init__(self, file, **keywords):
202-
"""Initialize a xlwt work book"""
201+
def __init__(self, file, encoding='ascii',
202+
style_compression=2, **keywords):
203+
"""Initialize a xlwt work book
204+
205+
206+
:param encoding: content encoding, defaults to 'ascii'
207+
:param style_compression: undocumented, but 2 is magically
208+
better
209+
reference: `style_compression <https://groups.google.com/
210+
forum/#!topic/python-excel/tUZkMRi8ITw>`_
211+
"""
203212
BookWriter.__init__(self, file, **keywords)
204-
self.wb = Workbook(style_compression=2)
213+
self.wb = Workbook(style_compression=style_compression,
214+
encoding=encoding)
205215

206216
def create_sheet(self, name):
207217
"""Create a xlwt writer"""

0 commit comments

Comments
 (0)