Browse Source

read_excel function will now use xlrd instead of pandas.

Akash 4 years ago
parent
commit
bb54ceabc0
1 changed files with 3 additions and 2 deletions
  1. 3 2
      baangt/base/HandleDatabase.py

+ 3 - 2
baangt/base/HandleDatabase.py

@@ -107,8 +107,9 @@ class HandleDatabase:
             for col_index in range(sheet.ncols):
                 d[keys[col_index]] = sheet.cell(row_index, col_index).value
                 if type(d[keys[col_index]])==float:
-                    if repr(d[keys[col_index]])[-2:]==".0":
-                        d[keys[col_index]] = repr(d[keys[col_index]])[:-2]
+                    d[keys[col_index]] = repr(d[keys[col_index]])
+                    if d[keys[col_index]][-2:]==".0":
+                        d[keys[col_index]] = d[keys[col_index]][:-2]
             self.dataDict.append(d)