Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes Date Format Incorrectly #54

Closed
Rehgan opened this issue Jul 20, 2016 · 3 comments
Closed

Changes Date Format Incorrectly #54

Rehgan opened this issue Jul 20, 2016 · 3 comments

Comments

@Rehgan
Copy link

Rehgan commented Jul 20, 2016

from pyexcel.ext import xls
from pyexcel.ext import xlsx

pyexcel.get_book(file_name='Data Issue.xls').save_as(folderpath + "CSV Input Files" + "Processing_" + newFileName + ".csv")

This is a bit of the code I use to convert a bunch of excel files of various formats to csvs. The attached file is the xls file that I try to convert and contains a column with dates in a date format. The date is 06/12/16 and this library changes it to 06/11/2012 for some reason.

Github won't allow me to upload a .xls so I have attached the xlsx file. To replicate the issue, save the file as a .xls. The problem will still occur.
Date Issue.xlsx

Any idea why this could be happening? Potentially it is that I import the xlsx after the xls library.

@chfw
Copy link
Member

chfw commented Jul 21, 2016

Hey, I am not able to reproduce it with the following setup:

pyexcel==0.2.4
pyexcel-io==0.2.1
pyexcel-xls==0.2.0
pyexcel-xlsx==0.2.0

And with pyexcel >= 0.2.2, you need to pay attention to this migration note. Here is an example:

>>> import pyexcel
>>> pyexcel.get_book(file_name="Date.Issue.xls", library="pyexcel-xls")

@chfw chfw closed this as completed Sep 7, 2016
@chfw
Copy link
Member

chfw commented Sep 7, 2016

please re-open it if the problem is still there

@chfw
Copy link
Member

chfw commented May 10, 2018

pip install pyexcel-xls==0.5.7 should fix the problem for you. Meanwhile, I am seeking to fix pyexcel-xlsx.

I am sorry to have been so slow to recognise it as a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants