Skip to content

Commit 7d96df8

Browse files
FIX - bug in calculation of row height (round to one fourth)
1 parent 886891d commit 7d96df8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

XLMMacroDeobfuscator/deobfuscator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ def deobfuscate_macro(self, interactive):
840840
break
841841
formula = current_cell.formula
842842
stack_record = False
843-
except IOError as exp:
843+
except Exception as exp:
844844
print('Error: ' + str(exp))
845845

846846

XLMMacroDeobfuscator/xlsm_wrapper.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import untangle
88
from io import StringIO
99
import os
10-
import math
1110

1211

1312
class XLSMWrapper(ExcelWrapper):
@@ -438,7 +437,7 @@ def get_cell_info(self, sheet_name, col, row, info_type_id):
438437
if row in sheet.row_attributes and RowAttribute.Height in sheet.row_attributes[row]:
439438
not_exist = False
440439
data = sheet.row_attributes[row][RowAttribute.Height]
441-
data = math.ceil(float(data))
440+
data = round(float(data)*4)/4
442441

443442

444443
# return None, None, True

0 commit comments

Comments
 (0)