code: def fillNullValues(col, rows):
      'Fill null cells in col with the previous non-null value'
      lastval = None
      nullfunc = isNullFunc()
      n = 0
      rowsToFill = list(rows)
      for r in Progress(col.sheet.rows, 'filling'):  # loop over all rows
          try:
              val = col.getValue(r)
          except Exception as e:
              val = e
  
          if nullfunc(val) and r in rowsToFill:
              if lastval:
                  col.setValue(r, lastval)
                  n += 1
          else:
              lastval = val
  
      col.recalc()
      status("filled %d values" % nf fillNullValues(col, rows):
      'Fill null cells in col with the previous non-null value'
      lastval = None
      nullfunc = isNullFunc()
      n = 0
      rowsToFill = list(rows)
      for r in Progress(col.sheet.rows, 'filling'):  # loop over all rows
          try:
              val = col.getValue(r)
          except Exception as e:
              val = e
  
          if nullfunc(val) and r in rowsToFill:
              if lastval:
                  col.setValue(r, lastval)
                  n += 1
          else:
              lastval = val
  
      col.recalc()
      status("filled %d values" % n)
docs: Fill null cells in col with the previous non-null value