Skip to content

Commit

Permalink
Spreadsheet: Fix to prevent unwanted characters in spreadsheet cells
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jul 6, 2014
1 parent 3d87d88 commit 1be778a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Mod/Spreadsheet/Spreadsheet.py
Expand Up @@ -617,6 +617,11 @@ def setCells(self,obj,spreadsheet):
if hasattr(value,arg):
value = getattr(value,arg)
try:
if isinstance(value,float) or isinstance(value,int):
pass
else:
value = str(value)
value = ''.join([ c for c in value if c not in ('<','>',':')])
setattr(spreadsheet.Proxy,cell,value)
if DEBUG: print "setting cell ",cell," to value ",value
except:
Expand Down

0 comments on commit 1be778a

Please sign in to comment.