update readme

This commit is contained in:
chfw 2014-12-04 22:51:45 +00:00
parent 651153c85a
commit 27fbfac260
1 changed files with 4 additions and 4 deletions

View File

@ -50,12 +50,12 @@ Write to an xl file
... from StringIO import StringIO
... else:
... from io import BytesIO as StringIO
>>> from pyexcel_xl.xlbook import OrderedDict
>>> from pyexcel.ext.xl import OrderedDict
Here's the sample code to write a dictionary to an xl file::
>>> from pyexcel_xl import XLWriter
>>> from pyexcel.ext.xl import XLWriter
>>> data = OrderedDict() # from collections import OrderedDict
>>> data.update({"Sheet 1": [[1, 2, 3], [4, 5, 6]]})
>>> data.update({"Sheet 2": [["row 1", "row 2", "row 3"]]})
@ -68,7 +68,7 @@ Read from an xl file
Here's the sample code::
>>> from pyexcel_xl import XLBook
>>> from pyexcel.ext.xl import XLBook
>>> book = XLBook("your_file.xls")
>>> # book.sheets() returns a dictionary of all sheet content
@ -83,7 +83,7 @@ Write an xl to memory
Here's the sample code to write a dictionary to an xl file::
>>> from pyexcel_xl import XLWriter
>>> from pyexcel.ext.xl import XLWriter
>>> data = OrderedDict()
>>> data.update({"Sheet 1": [[1, 2, 3], [4, 5, 6]]})
>>> data.update({"Sheet 2": [[7, 8, 9], [10, 11, 12]]})