Skip to content

Commit f8321ad

Browse files
committed
interface update
1 parent c352b32 commit f8321ad

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Write to an xls file
5353
>>> from pyexcel.ext.xls import OrderedDict
5454

5555

56-
Here's the sample code to write a dictionary to an xl file::
56+
Here's the sample code to write a dictionary to an xls file::
5757

5858
>>> from pyexcel_xls import XLWriter
5959
>>> data = OrderedDict() # from collections import OrderedDict
@@ -81,7 +81,7 @@ Here's the sample code::
8181
Write an xls to memory
8282
**********************
8383

84-
Here's the sample code to write a dictionary to an xl file::
84+
Here's the sample code to write a dictionary to an xls file::
8585

8686
>>> from pyexcel_xls import XLWriter
8787
>>> data = OrderedDict()
@@ -102,7 +102,7 @@ Read from an xls from memory
102102
Continue from previous example::
103103

104104
>>> # This is just an illustration
105-
>>> # In reality, you might deal with xl file upload
105+
>>> # In reality, you might deal with xls file upload
106106
>>> # where you will read from requests.FILES['YOUR_XL_FILE']
107107
>>> book = XLBook(None, io.getvalue())
108108
>>> print(json.dumps(book.sheets()))
@@ -118,7 +118,7 @@ Import it in your file to enable this plugin::
118118

119119
Please note only pyexcel version 0.0.4+ support this.
120120

121-
Reading from an xl file
121+
Reading from an xls file
122122
************************
123123

124124
Here is the sample code::
@@ -140,7 +140,7 @@ Here is the sample code::
140140
| row 1 | row 2 | row 3 |
141141
+-------+-------+-------+
142142

143-
Writing to an xl file
143+
Writing to an xls file
144144
**********************
145145

146146
Here is the sample code::
@@ -153,7 +153,7 @@ Reading from a IO instance
153153
You got to wrap the binary content with stream to get xls working::
154154

155155
>>> # This is just an illustration
156-
>>> # In reality, you might deal with xl file upload
156+
>>> # In reality, you might deal with xls file upload
157157
>>> # where you will read from requests.FILES['YOUR_XL_FILE']
158158
>>> xlfile = "another_file.xls"
159159
>>> with open(xlfile, "rb") as f:

pyexcel_xls/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ class XLSheet(SheetReader):
5656
"""
5757
def __init__(self, sheet):
5858
SheetReader.__init__(self, sheet)
59-
self.name = sheet.name
59+
60+
@property
61+
def name(self):
62+
return self.native_sheet.name
6063

6164
def number_of_rows(self):
6265
"""

0 commit comments

Comments
 (0)