(self, rowlist, collist)
return
Fill down a column, or multiple columns
Fill down a column, or multiple columns
Fill down a column or multiple columns
def fillDown(self, rowlist, collist):
        """Fill down a column, or multiple columns"""
        model = self.model
        #absrow  = self.get_AbsoluteRow(rowlist[0])
        #remove first element as we don't want to overwrite it
        rowlist.remove(rowlist[0])

        #if this is a formula, we have to treat it specially
        for col in collist:
            val = self.model.getCellRecord(row, col)
            f=val #formula to copy
            i=1
            for r in rowlist:
                #absr = self.get_AbsoluteRow(r)
                if Formula.isFormula(f):
                    newval = model.copyFormula(f, r, col, offset=i)
                    model.setFormulaAt(newval, r, col)
                else:
                    model.setValueAt(val, r, col)
                #print 'setting', val, 'at row', r
                i+=1

        self.redrawTable()
        return
def fillDown ( self , rowlist , collist ) : model = self . model #absrow  = self.get_AbsoluteRow(rowlist[0]) #remove first element as we don't want to overwrite it rowlist . remove ( rowlist [ 0 ] ) #if this is a formula, we have to treat it specially for col in collist : val = self . model . getCellRecord ( row , col ) f = val #formula to copy i = 1 for r in rowlist : #absr = self.get_AbsoluteRow(r) if Formula . isFormula ( f ) : newval = model . copyFormula ( f , r , col , offset = i ) model . setFormulaAt ( newval , r , col ) else : model . setValueAt ( val , r , col ) #print 'setting', val, 'at row', r i += 1 self . redrawTable ( ) return