Skip to content

Commit cbd1485

Browse files
committed
better handle floating point 0.xxx
1 parent 629f3ec commit cbd1485

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyexcel_htmlr/htmlr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ def _detect_date_value(csv_cell_text):
171171

172172
def _detect_float_value(csv_cell_text):
173173
try:
174-
if csv_cell_text.startswith('0'):
174+
should_we_skip_it = (csv_cell_text.startswith('0') and
175+
csv_cell_text.startswith('0.') is False)
176+
if should_we_skip_it:
175177
# do not convert if a number starts with 0
176178
# e.g. 014325
177179
return None

0 commit comments

Comments
 (0)