update plugin details

This commit is contained in:
chfw 2016-05-05 21:54:15 +01:00
parent 2c6586fe10
commit 5ad7eb00d1
2 changed files with 12 additions and 7 deletions

View File

@ -7,12 +7,14 @@
:copyright: (c) 2015-2016 by Onni Software Ltd :copyright: (c) 2015-2016 by Onni Software Ltd
:license: New BSD License :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'] __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): def get_data(afile, file_type=None, **keywords):
if isstream(afile) and file_type is None: if isstream(afile) and file_type is None:
file_type = 'xls' file_type = 'xls'

View File

@ -249,19 +249,22 @@ _xls_registry = {
"file_type": "xls", "file_type": "xls",
"reader": XLSBook, "reader": XLSBook,
"writer": XLSWriter, "writer": XLSWriter,
"stream_type": "binary" "stream_type": "binary",
"mime_type": "application/vnd.ms-excel"
} }
_xlsm_registry = { _xlsm_registry = {
"file_type": "xlsm", "file_type": "xlsm",
"reader": XLSBook, "reader": XLSBook,
"stream_type": "binary" "stream_type": "binary",
"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
} }
_xlsx_registry = { _xlsx_registry = {
"file_type": "xlsm", "file_type": "xlsx",
"reader": XLSBook, "reader": XLSBook,
"stream_type": "binary" "stream_type": "binary",
"mime_type": "application/vnd.ms-excel.sheet.macroenabled.12"
} }
exports = (_xls_registry, _xlsm_registry, _xlsx_registry) exports = (_xls_registry, _xlsm_registry, _xlsx_registry)