Repository: jazzband/tablib (python)

Issue:
Databook unable to load xls
I'm trying to load an xls file however it fails with the following error
```
with open("xls_file", "rb") as fh: 
    imported_data = Databook().load(fh, "xls")
```
```
Traceback (most recent call last):
  File ".\test.py", line 5, in <module>
    imported_data = Databook().load(fh, "xls")
  File "lib\site-packages\tablib\core.py", line 872, in load
    fmt.import_book(self, stream, **kwargs)
  File "lib\site-packages\tablib\formats\_xls.py", line 103, in import_book
    xls_book = xlrd.open_workbook(file_contents=in_stream)
  File "lib\site-packages\xlrd\__init__.py", line 166, in open_workbook
    file_format = inspect_format(filename, file_contents)
  File "lib\site-packages\xlrd\__init__.py", line 57, in inspect_format
    peek = content[:PEEK_SIZE]
TypeError: '_io.BufferedReader' object is not subscriptable
```

Pull request description:
Fix crash when loading databook from XLS
`xlrd.open_workbook()` function expects the `file_contents` argument to be a string.

Fixes #522

Patch:
diff --git a/src/tablib/formats/_xls.py b/src/tablib/formats/_xls.py
index 6c8dce7..2c6c527 100644
--- a/src/tablib/formats/_xls.py
+++ b/src/tablib/formats/_xls.py
@@ -100,7 +100,7 @@ class XLSFormat:
 
         dbook.wipe()
 
-        xls_book = xlrd.open_workbook(file_contents=in_stream)
+        xls_book = xlrd.open_workbook(file_contents=in_stream.read())
 
         for sheet in xls_book.sheets():
             data = tablib.Dataset()


Test patch:
diff --git a/tests/test_tablib.py b/tests/test_tablib.py
index 9830d78..e783d41 100755
--- a/tests/test_tablib.py
+++ b/tests/test_tablib.py
@@ -1147,6 +1147,11 @@ class XLSTests(BaseTestCase):
             ])
         )
 
+    def test_book_import_from_stream(self):
+        in_stream = self.founders.xls
+        book = tablib.Databook().load(in_stream, 'xls')
+        self.assertEqual(book.sheets()[0].title, 'Founders')
+
 
 class XLSXTests(BaseTestCase):
     def test_xlsx_format_detect(self):