Skip to content

Commit b7a2c1a

Browse files
committed
Float is the default cell type
1 parent d067a36 commit b7a2c1a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

xlsx2csv.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,9 @@ def handleCharData(self, data):
877877
format_type = "float"
878878
elif self.colType == "n":
879879
format_type = "float"
880+
elif not self.colType and len(self.data) and self.data[0] >= '0' and self.data[0] <= '9':
881+
# default assumption for a cell without t attribute is that it is a number
882+
format_type = "float"
880883

881884
if format_type and not format_type in self.ignore_formats and self.data not in EXCEL_ERROR_VALUES:
882885
try:

0 commit comments

Comments
 (0)