roskakori/cutplace

Improve Excel data fields

roskakori opened this issue · 1 comments

Currently Excel date fields only support the format YYYY-MM-DD hh:mm:ss and use some heuristics to decide if it is a date or time only fields.

Actually Excel supports custom formats, as described in for example https://www.ablebits.com/office-addins-blog/2015/03/11/change-date-format-excel/#custom-date-format. Most of them can be mapped to to a cutplace DateTime format.

Currently xlrd does not seem to support custom formats very well. In particular there are differences between classic Excel *.xls and XML Excel *.xlsx.

As a consequence, the improved cutplace reader at least checks the rule of the DateTime fields and now allows for YYYY-MM-DD hh:mm:ss, YYYY-MM-DD or hh:mm:ss. This makes it possible to specify plain dates and times.