diff --git a/pyexcel_xls/__init__.py b/pyexcel_xls/__init__.py index 36c9adf..c1d855e 100644 --- a/pyexcel_xls/__init__.py +++ b/pyexcel_xls/__init__.py @@ -117,7 +117,9 @@ def write_row(self, array): value = array[i] style = None tmp_array = [] - if isinstance(value, datetime.date) or isinstance(value, datetime.datetime): + is_date_type = (isinstance(value, datetime.date) or + isinstance(value, datetime.datetime)) + if is_date_type: tmp_array = [value.year, value.month, value.day] value = xlrd.xldate.xldate_from_date_tuple(tmp_array, 0) style = XFStyle() @@ -167,4 +169,4 @@ def close(self): # to allow this module to function independently pass -__VERSION__ = "0.0.1" \ No newline at end of file +__VERSION__ = "0.0.3" diff --git a/setup.py b/setup.py index 1a41af6..4d92f60 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( name='pyexcel-xls', author="C. W.", - version='0.0.2', + version='0.0.3', 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',