Return |_Cell| instance correponding to table cell at *row_idx*,
        *col_idx* intersection, where (0, 0) is the top, left-most cell.
439996
def cell(self, row_idx, col_idx):
        
        cell_idx = col_idx + (row_idx * self._column_count)
        return self._cells[cell_idx]
271918
def _find_valid_block(self, table, worksheet, flags, units, used_cells, start_pos, end_pos):
        '''
        
        '''
        for row_index in range(len(table)):
            if row_index < start_pos[0] or row_index > end_pos[0]:
                continue
            convRow = table[row_index]
            used_row = used_cells[row_index]
            for column_index, conv in enumerate(convRow):
                if (column_index < start_pos[1] or column_index > end_pos[1] or used_row[column_index]):
                    continue
                # Is non empty cell?
                if not is_empty_cell(conv):
                    block_start, block_end = self._find_block_bounds(table, used_cells,
                            (row_index, column_index), start_pos, end_pos)
                    if (block_end[0] > block_start[0] and
                        block_end[1] > block_start[1]):
                        try:
                            return TableBlock(table, used_cells, block_start, block_end, worksheet,
                                flags, units, self.assume_complete_blocks, self.max_title_rows)
                        except InvalidBlockError:
                            pass
                        # Prevent infinite loops if something goes wrong
                        used_cells[row_index][column_index] = True
1109620
def _match(self):
        """"""
        #disable optimized matching
        optimized_rows = None
        optimized_columns = None
        for match in self.__match_rows(optimized_rows):
            #match in rows
            yield match
        for match in self.__match_rows(optimized_columns,
                                       transpose=True):
            #match in columns and transpose coordinates
            yield match
1183631
function (startCell, endCell, callback) {
      var result = {
        index: [], // list of cell index: A1, A2, A3
        value: []  // list of cell value
      };

      var cols = {
        start: 0,
        end: 0
      };

      if (endCell.col >= startCell.col) {
        cols = {
          start: startCell.col,
          end: endCell.col
        };
      } else {
        cols = {
          start: endCell.col,
          end: startCell.col
        };
      }

      var rows = {
        start: 0,
        end: 0
      };

      if (endCell.row >= startCell.row) {
        rows = {
          start: startCell.row,
          end: endCell.row
        };
      } else {
        rows = {
          start: endCell.row,
          end: startCell.row
        };
      }

      for (var column = cols.start; column <= cols.end; column++) {
        for (var row = rows.start; row <= rows.end; row++) {
          var cellIndex = instance.utils.toChar(column) + (row + 1),
              cellValue = instance.helper.cellValue.call(this, cellIndex);

          result.index.push(cellIndex);
          result.value.push(cellValue);
        }
      }

      if (instance.utils.isFunction(callback)) {
        return callback.apply(callback, [result]);
      } else {
        return result;
      }
    }
752813
def getCell(self, row, width=None):
        ''
        cellval = wrapply(self.getValue, row)
        typedval = wrapply(self.type, cellval)

        if isinstance(typedval, TypedWrapper):
            if isinstance(cellval, TypedExceptionWrapper):  # calc failed
                exc = cellval.exception
                if cellval.forwarded:
                    dispval = str(cellval)  # traceback.format_exception_only(type(exc), exc)[-1].strip()
                else:
                    dispval = options.disp_error_val
                return DisplayWrapper(cellval.val, error=exc.stacktrace,
                                        display=dispval,
                                        note=options.note_getter_exc,
                                        notecolor='color_error')
            elif typedval.val is None:  # early out for strict None
                return DisplayWrapper(None, display='',  # force empty display for None
                                            note=options.disp_note_none,
                                            notecolor='color_note_type')
            elif isinstance(typedval, TypedExceptionWrapper):  # calc succeeded, type failed
                return DisplayWrapper(typedval.val, display=str(cellval),
                                            error=typedval.exception.stacktrace,
                                            note=options.note_type_exc,
                                            notecolor='color_warning')
            else:
                return DisplayWrapper(typedval.val, display=str(typedval.val),
                                            note=options.note_type_exc,
                                            notecolor='color_warning')

        elif isinstance(typedval, threading.Thread):
            return DisplayWrapper(None,
                                display=options.disp_pending,
                                note=options.note_pending,
                                notecolor='color_note_pending')

        dw = DisplayWrapper(cellval)

        try:
            dw.display = self.format(typedval) or ''

            if width and isNumeric(self):
                dw.display = dw.display.rjust(width-1)

            # annotate cells with raw value type in anytype columns, except for strings
            if self.type is anytype and type(cellval) is not str:
                typedesc = typemap.get(type(cellval), None)
                dw.note = typedesc.icon if typedesc else options.note_unknown_type
                dw.notecolor = 'color_note_type'

        except Exception as e:  # formatting failure
            e.stacktrace = stacktrace()
            dw.error = e
            try:
                dw.display = str(cellval)
            except Exception as e:
                dw.display = str(e)
            dw.note = options.note_format_exc
            dw.notecolor = 'color_warning'

        return dw
1037486
function(startRow, endRow, startCol, endCol) {
            	var x = [];
            	
            	if(endRow == 0)
            	    endRow = this.rows();
            	
            	if(endCol == 0)
            	    endCol = this.cols();

            	for(i = startRow; i <= endRow; i++) {
            	    var row = [];

            	    for(j = startCol; j <= endCol; j++) {
            		row.push(this.e(i, j));
            	    }

            	    x.push(row);
            	}

            	return $M(x);
                }
1262217
def GetCellValue (self, column, row = None, default = None):
                
                if row == None:
                        (row, column) = ParseCellSpec(column)
                if row in self:
                        return self[row].GetCellValue(column, default)
                return default
120278
def pprint_cell(self, row, col):
        
        ndims = self.ndims
        if col >= self.cols:
            raise Exception("Maximum column index is %d" % self.cols-1)
        elif row >= self.rows:
            raise Exception("Maximum row index is %d" % self.rows-1)
        elif row == 0:
            if col >= ndims:
                if self.vdims:
                    return self.vdims[col - ndims].pprint_label
                else:
                    return ''
            return self.kdims[col].pprint_label
        else:
            dim = self.get_dimension(col)
            return dim.pprint_value(self.iloc[row-1, col])
1366323
def _find_titles(self, row_index, column_index):
        '''
        
        '''
        titles = []

        for column_search in range(self.start[1], column_index):
            cell = self.table[row_index][column_search]
            if cell == None or (isinstance(cell, basestring) and not cell):
                continue
            elif isinstance(cell, basestring):
                titles.append(cell)
            else:
                break

        for row_search in range(self.start[0], row_index):
            cell = self.table[row_search][column_index]
            if cell == None or (isinstance(cell, basestring) and not cell):
                continue
            elif isinstance(cell, basestring):
                titles.append(cell)
            else:
                break

        return titles
1337065
def match(self, row):
        
        return fnmatch.fnmatchcase(row[self._field], self._expression)
234648
def get_lt(self):
        """"""

        cell_above_left = CellBorders(self.cell_attributes,
                                      *self.cell.get_above_left_key_rect())
        return cell_above_left.get_b()
772052
def process_cell(self, row, column, cell):
        
        value, field = self.parse_cell(cell)

        if value or field:
            return {'col':column, 'field':field, 'value':value}
        else:
            return {}
1023180
def intersection(self, range):
        
        if self.worksheet != range.worksheet:
            # Different worksheet
            return None
        start = (max(self._start[0], range._start[0]),
                 max(self._start[1], range._start[1]))
        end = (min(self._end[0], range._end[0]),
               min(self._end[1], range._end[1]))
        if end[0] < start[0] or end[1] < start[1]:
            return None
        return Range(start, end, self.worksheet, validate=False)
1239197
public Cell<C, T> row() {
        if (cells.size() > 0)
            endRow();
        if (rowDefaults != null)
            toolkit.freeCell(rowDefaults);
        rowDefaults = toolkit.obtainCell(this);
        rowDefaults.clear();
        return rowDefaults;
    }
928536
def cell(self, rowName, columnName):
        
        return self.matrix[self.rowIndices[rowName], self.columnIndices[columnName]]
629524
void findMinElementIndexInRows(int leftmost[] )
    {
        Arrays.fill(leftmost,0,m,-1);

        // leftmost[i] = min(find(A(i,:)))
        for (int k = n-1; k >= 0; k--) {
            int idx0 = A.col_idx[k];
            int idx1 = A.col_idx[k+1];

            for( int p = idx0; p < idx1; p++ ) {
                leftmost[A.nz_rows[p]] = k;
            }
        }
    }
1064915
def get_tl(self):
        """"""

        cell_above_left = CellBorders(self.cell_attributes,
                                      *self.cell.get_above_left_key_rect())
        return cell_above_left.get_r()