def row_iterator(self): """ iterate each row override this function in the sitation where number_of_rows() is difficult or costly to implement """ return irange(self.number_of_rows())
def column_iterator(self, row): """ iterate each column of a given row override this function in the sitation where number_of_columns() is difficult or costly to implement """ for column in irange(self.number_of_columns()): yield self.cell_value(row, column)
def register_cells(self, registry): for rowx in irange(self.__rl, self.__rh + 1): for colx in irange(self.__cl, self.__ch + 1): key = "%s-%s" % (rowx, colx) registry[key] = self
def register_cells(self, registry): for rowx in irange(self.__rl, self.__rh): for colx in irange(self.__cl, self.__ch): key = "%s-%s" % (rowx, colx) registry[key] = self
def _iterate_columns(self, row): for column in irange(self.number_of_columns()): yield self._cell_value(row, column)
def _iterate_rows(self): return irange(self.number_of_rows())