parameters: (self,obj,spreadsheet)
docstring: Fills the controlled cells of the given spreadsheet
docstring_summary: Fills the controlled cells of the given spreadsheet
docstring_tokens: Fills the controlled cells of the given spreadsheet
function: def setCells(self,obj,spreadsheet):
          "Fills the controlled cells of the given spreadsheet"
          if obj.BaseCell:
              dataset = self.getDataSet(obj)
              if obj.DataType == "Count":
                  if spreadsheet.Proxy.isKey(obj.BaseCell):
                      try:
                          setattr(spreadsheet.Proxy,obj.BaseCell,len(dataset))
                      except:
                          print("Spreadsheet: Error counting objects")
              elif obj.Data:
                  for i in range(len(dataset)):
                      # get the correct cell key
                      c,r = spreadsheet.Proxy.splitKey(obj.BaseCell)
                      if obj.Direction == "Horizontal":
                          c = c.lower()
                          c = "abcdefghijklmnopqrstuvwxyz".index(c)
                          c += i
                          c = "abcdefghijklmnopqrstuvwxyz"[c]
                      else:
                          r = int(r) + i
                      cell = c+str(r)
                      if DEBUG: print("auto setting cell ",cell)
                      if spreadsheet.Proxy.isKey(cell):
                          # get the contents
                          args = obj.Data.split(".")
                          value = dataset[i]
                          for arg in args:
                              print(arg)
                              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:
                              print("Spreadsheet: Error retrieving property "+obj.Data+" from object "+dataset[i].Name)
function_tokens: def setCells ( self , obj , spreadsheet ) : if obj . BaseCell : dataset = self . getDataSet ( obj ) if obj . DataType == "Count" : if spreadsheet . Proxy . isKey ( obj . BaseCell ) : try : setattr ( spreadsheet . Proxy , obj . BaseCell , len ( dataset ) ) except : print ( "Spreadsheet: Error counting objects" ) elif obj . Data : for i in range ( len ( dataset ) ) : # get the correct cell key c , r = spreadsheet . Proxy . splitKey ( obj . BaseCell ) if obj . Direction == "Horizontal" : c = c . lower ( ) c = "abcdefghijklmnopqrstuvwxyz" . index ( c ) c += i c = "abcdefghijklmnopqrstuvwxyz" [ c ] else : r = int ( r ) + i cell = c + str ( r ) if DEBUG : print ( "auto setting cell " , cell ) if spreadsheet . Proxy . isKey ( cell ) : # get the contents args = obj . Data . split ( "." ) value = dataset [ i ] for arg in args : print ( arg ) 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 : print ( "Spreadsheet: Error retrieving property " + obj . Data + " from object " + dataset [ i ] . Name )