Skip to content

Commit b7c0deb

Browse files
committed
🔥 remove useless code as it is now handled in pyexcel-io
1 parent c7425ff commit b7c0deb

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

pyexcel_xlsx/xlsxr.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
:license: New BSD License
99
"""
1010
import openpyxl
11-
from io import UnsupportedOperation
1211

1312
from pyexcel_io.book import BookReader
1413
from pyexcel_io.sheet import SheetReader
15-
from pyexcel_io._compact import OrderedDict, BytesIO
14+
from pyexcel_io._compact import OrderedDict
1615

1716

1817
class XLSXSheet(SheetReader):
@@ -50,16 +49,6 @@ def open(self, file_name, skip_hidden_sheets=True, **keywords):
5049
self._load_the_excel_file(file_name)
5150

5251
def open_stream(self, file_stream, skip_hidden_sheets=True, **keywords):
53-
if not hasattr(file_stream, 'seek'):
54-
# python 2
55-
# Hei zipfile in odfpy would do a seek
56-
# but stream from urlib cannot do seek
57-
file_stream = BytesIO(file_stream.read())
58-
try:
59-
file_stream.seek(0)
60-
except UnsupportedOperation:
61-
# python 3
62-
file_stream = BytesIO(file_stream.read())
6352
BookReader.open_stream(self, file_stream, **keywords)
6453
self.skip_hidden_sheets = skip_hidden_sheets
6554
self._load_the_excel_file(file_stream)

rnd_requirements.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
https://github.com/chfw/lml/archive/master.zip
2-
https://github.com/pyexcel/pyexcel-io/archive/master.zip
3-
https://github.com/pyexcel/pyexcel/archive/master.zip
4-
https://github.com/pyexcel/pyexcel-xls/archive/master.zip
1+
https://github.com/pyexcel/pyexcel-io/archive/dev.zip
2+
https://github.com/pyexcel/pyexcel-xls/archive/dev.zip

0 commit comments

Comments
 (0)