(self, cellval, row, col, offset=1, dim='y')
return newformula
Copy a formula down or across, using the provided offset
Copy a formula down or across, using the provided offset
Copy a formula down or across using the provided offset
def copyFormula(self, cellval, row, col, offset=1, dim='y'):
        """Copy a formula down or across, using the provided offset"""
        import re
        frmla = Formula.getFormula(cellval)
        #print 'formula', frmla

        newcells=[]
        cells, ops = Formula.readExpression(frmla)

        for c in cells:
            print (c)
            if type(c) is not ListType:
                nc = c
            else:
                recname = c[0]
                colname = c[1]
                nc = list(self.getRecAtRow(recname, colname, offset, dim=dim))
            newcells.append(nc)
        newformula = Formula.doExpression(newcells, ops, getvalues=False)
        return newformula
def copyFormula ( self , cellval , row , col , offset = 1 , dim = 'y' ) : import re frmla = Formula . getFormula ( cellval ) #print 'formula', frmla newcells = [ ] cells , ops = Formula . readExpression ( frmla ) for c in cells : print ( c ) if type ( c ) is not ListType : nc = c else : recname = c [ 0 ] colname = c [ 1 ] nc = list ( self . getRecAtRow ( recname , colname , offset , dim = dim ) ) newcells . append ( nc ) newformula = Formula . doExpression ( newcells , ops , getvalues = False ) return newformula