update io interface to 0.0.4

This commit is contained in:
chfw 2015-04-30 09:23:05 +01:00
parent 2323cb1740
commit 44b3bdc5ad
2 changed files with 21 additions and 19 deletions

View File

@ -1,5 +1,5 @@
"""
pyexcel.ext.xls
pyexcel_xls
~~~~~~~~~~~~~~~~~~~
The lower level xls/xlsm file format handler using xlrd/xlwt
@ -11,7 +11,14 @@ import sys
import datetime
import xlrd
from xlwt import Workbook, XFStyle
from pyexcel_io import SheetReader, BookReader, SheetWriter, BookWriter
from pyexcel_io import (
SheetReader,
BookReader,
SheetWriter,
BookWriter,
READERS,
WRITERS
)
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
from ordereddict import OrderedDict
else:
@ -203,20 +210,15 @@ class XLWriter(BookWriter):
"""
self.wb.save(self.file)
try:
from pyexcel.io import READERS
from pyexcel.io import WRITERS
READERS.update({
"xls": XLBook,
"xlsm": XLBook,
"xlsx": XLBook
})
WRITERS.update({
"xls": XLWriter
})
except:
# to allow this module to function independently
pass
READERS.update({
"xls": XLBook,
"xlsm": XLBook,
"xlsx": XLBook
})
WRITERS.update({
"xls": XLWriter
})
__VERSION__ = "0.0.6"
__VERSION__ = "0.0.7"

View File

@ -12,7 +12,7 @@ with open("README.rst", 'r') as readme:
dependencies = [
'xlrd',
'xlwt-future',
'pyexcel-io>=0.0.3'
'pyexcel-io>=0.0.4'
]
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
dependencies.append('ordereddict')
@ -20,7 +20,7 @@ if sys.version_info[0] == 2 and sys.version_info[1] < 7:
setup(
name='pyexcel-xls',
author="C. W.",
version='0.0.6',
version='0.0.7',
author_email="wangc_2011@hotmail.com",
url="https://github.com/chfw/pyexcel-xls",
description='A wrapper library to read, manipulate and write data in xls format. It reads xlsx and xlsm format',