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

in2csv --date-format not handling xls DD-MMM date formatted column #1190

Closed
johnandrea opened this issue Jan 23, 2023 · 1 comment
Closed
Labels

Comments

@johnandrea
Copy link

Column formatted with code DD-MMM with values such as 30-Dec remain unformatted via in2csv which outputs a single number such as 38820.0

Example: https://mi.lincolnshiremarriages.org.uk/bostonRD.xls

@jpmckinney
Copy link
Member

jpmckinney commented Mar 6, 2023

For whatever reason, that XLS file encodes all cells as XL_CELL_TEXT instead of the date cells as XL_CELL_DATE. csvkit (more specifically agate-excel) only parses dates from XL_CELL_DATE.

So, there's unfortunately not much for csvkit to do here, because attempting to convert all possible cells to dates just in case they are intended to be dates is very expensive and also probably not what most people want.

You could try re-saving the XLS file after setting the cell type.

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

No branches or pull requests

2 participants