update code comment
This commit is contained in:
parent
9db94597c8
commit
88f70c2220
|
@ -2,30 +2,31 @@
|
||||||
pyexcel_xls
|
pyexcel_xls
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The lower level xls/xlsm file format handler using xlrd/xlwt
|
The lower level xls/xlsx/xlsm file format handler using xlrd/xlwt
|
||||||
|
|
||||||
:copyright: (c) 2015-2016 by Onni Software Ltd
|
:copyright: (c) 2015-2016 by Onni Software Ltd
|
||||||
:license: New BSD License
|
:license: New BSD License
|
||||||
"""
|
"""
|
||||||
# this line has to be place above all else
|
# this line has to be place above all else
|
||||||
# because of dynamic import
|
# because of dynamic import
|
||||||
__pyexcel_io_plugins__ = ['xls']
|
_FILE_TYPE = 'xls'
|
||||||
|
__pyexcel_io_plugins__ = [_FILE_TYPE]
|
||||||
|
|
||||||
|
|
||||||
from pyexcel_io.io import get_data as read_data, isstream, store_data as write_data
|
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):
|
||||||
"""standalone module function for writing module supported file type"""
|
"""standalone module function for reading module supported file type"""
|
||||||
if isstream(afile) and file_type is None:
|
if isstream(afile) and file_type is None:
|
||||||
file_type = 'xls'
|
file_type = _FILE_TYPE
|
||||||
return read_data(afile, file_type=file_type, **keywords)
|
return read_data(afile, file_type=file_type, **keywords)
|
||||||
|
|
||||||
|
|
||||||
def save_data(afile, data, file_type=None, **keywords):
|
def save_data(afile, data, file_type=None, **keywords):
|
||||||
"""standalone module function for reading module supported file type"""
|
"""standalone module function for writing module supported file type"""
|
||||||
if isstream(afile) and file_type is None:
|
if isstream(afile) and file_type is None:
|
||||||
file_type = 'xls'
|
file_type = _FILE_TYPE
|
||||||
write_data(afile, data, file_type=file_type, **keywords)
|
write_data(afile, data, file_type=file_type, **keywords)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue