diff --git a/pyexcel_xls/__init__.py b/pyexcel_xls/__init__.py index 96e6259..3fe12d6 100644 --- a/pyexcel_xls/__init__.py +++ b/pyexcel_xls/__init__.py @@ -7,12 +7,14 @@ :copyright: (c) 2015-2016 by Onni Software Ltd :license: New BSD License """ -from pyexcel_io.io import get_data as read_data, isstream, store_data as write_data - - +# this line has to be place above all else +# because of dynamic import __pyexcel_io_plugins__ = ['xls'] +from pyexcel_io.io import get_data as read_data, isstream, store_data as write_data + + def get_data(afile, file_type=None, **keywords): if isstream(afile) and file_type is None: file_type = 'xls' diff --git a/pyexcel_xls/xls.py b/pyexcel_xls/xls.py index 964cd10..21c9fd2 100644 --- a/pyexcel_xls/xls.py +++ b/pyexcel_xls/xls.py @@ -249,19 +249,22 @@ _xls_registry = { "file_type": "xls", "reader": XLSBook, "writer": XLSWriter, - "stream_type": "binary" + "stream_type": "binary", + "mime_type": "application/vnd.ms-excel" } _xlsm_registry = { "file_type": "xlsm", "reader": XLSBook, - "stream_type": "binary" + "stream_type": "binary", + "mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" } _xlsx_registry = { - "file_type": "xlsm", + "file_type": "xlsx", "reader": XLSBook, - "stream_type": "binary" + "stream_type": "binary", + "mime_type": "application/vnd.ms-excel.sheet.macroenabled.12" } exports = (_xls_registry, _xlsm_registry, _xlsx_registry)