Open sergeilem opened 7 years ago
yes, it is a complicated job, thanks for the information, I will check the xlrd code
Any news on this?
As not needing dates myself, I added && false
to line 55 in col.go
to prevent it from formatting it as a date.
This is why sometimes the resulting string is General
.
My knowledge is unfortunately not enough to provide an actual fix for this.
anyone want this feature,please use the branch#new_formatter. It is a unfinished branch, but can be used for basic number and data output,.
When user uses specific format for number, for example format "# ##0.00_ ;[Red]-# ##0.00\" (users love this format), this number will be read as date. This is because XfRk.String() reads as date all numbers with formatNo>=164 and above format have formatNo=190. It would be better to check format string and if it contains "#" or ".00", read it as a number.
col.go:
Also extra import needed (strings).
Or you can implement more precise heuristics, take a look at is_date_format_string function from python's xlrd here https://github.com/python-excel/xlrd/blob/master/xlrd/formatting.py (line 457).