Returns the content of a spreadsheet-cell.
 (1,1) is the upper left corner.
 (1,1), (1,'A'), ('A',1), ('a',1) all refers to the
 cell at the first line and first row.
427711
def cell(row, col, sheet = nil)
      sheet ||= default_sheet
      read_cells(sheet)
      row, col = normalize(row, col)
      if celltype(row, col, sheet) == :date
        yyyy, mm, dd = @cell[sheet][[row, col]].to_s.split('-')
        return Date.new(yyyy.to_i, mm.to_i, dd.to_i)
      end

      @cell[sheet][[row, col]]
    end
984522
def parse_cell(self, cell):
        
        field = ''
        if (isinstance(cell.value, (str, unicode)) and
            cell.value.startswith('{{') and
            cell.value.endswith('}}')):
            field = cell.value[2:-2].strip()
            value = ''
        else:
            value = cell.value

        return value, field
912602
def row_content_length(row):
    '''
    
    '''
    if not row:
        return 0
    try:
        return (index + 1 for index, cell in reversed(list(enumerate(row))) if not is_empty_cell(cell)).next()
    except StopIteration:
        return len(row)
1161980
def [](cell_def)
      return rows[cell_def] if cell_def.is_a?(Integer)
      parts = cell_def.split(':').map{ |part| name_to_cell part }
      if parts.size == 1
        parts.first
      else
        range(*parts)
      end
    end
1297894
def cell reference
      # if the reference is to a named range of cells, get that range and return it
      if named_range = named_ranges.detect{|e| e.name == reference}
        cells = named_range.cells.compact
        if cells.empty?
          return nil
        else
          return cells.length == 1 ? cells.first : cells
        end
      end
      
      # check if the named_range is a full column reference
      if column_reference?(named_range)
        return all_cells_in_column named_range.formula
      end
      
      # if the reference is to an area of cells, get all the cells in that area and return them
      cells = cells_in_area(reference)
      unless cells.empty?
        return cells.length == 1 ? cells.first : cells
      end
      
      if column_reference?(reference)
        return all_cells_in_column reference
      end

      ref = POI::CELL_REF.new(reference)
      single_cell ref
    end
1066409
function (cell, counter) {
      var alphaNum = instance.utils.getCellAlphaNum(cell),
          alpha = alphaNum.alpha,
          col = instance.utils.toChar(parseInt(instance.utils.toNum(alpha) + counter, 10)),
          row = alphaNum.num;

      if (!col || col.length === 0) {
        col = 'A';
      }

      var fixedCol = alpha[0] === '$' || false,
          fixedRow = alpha[alpha.length - 1] === '$' || false;

      col = (fixedCol ? '$' : '') + col;
      row = (fixedRow ? '$' : '') + row;

      return col + '' + row;
    }
725122
def text(self):
        """"""
        divisions = list(self.divisions)
        if len(divisions) == 0:
            return ''
        elif len(divisions) == 1:
            return divisions[0].text.strip()
        else:
            return super().text
614241
def get_cell(self, row, column):
        
        url = self.build_url(self._endpoints.get('get_cell').format(row=row, column=column))
        response = self.session.get(url)
        if not response:
            return None
        return self.range_constructor(parent=self, **{self._cloud_data_key: response.json()})
884919
def get_cell(row_index, column_index)
      if within_range?(row_index, column_index)
        @rows[row_index][column_index].v
      else
        raise RangeError, "row_index and column_index MUST be < @rows.size and @cols.size", caller
      end
    end
648778
def cell_to_rowcol(cell)       #:nodoc:
    cell =~ /\$?([A-I]?[A-Z])\$?(\d+)/
    col     = $1
    row     = $2.to_i

    col = chars_to_col($1.split(//))

    # Convert 1-index to zero-index
    row -= 1
    col -= 1

    [row, col]
  end
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()
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
1131377
public String getCellValue(int iRow, int iCol) {
        if (cells == null) return " ";
        return cells[iRow][iCol].valueAsString();
    }
972302
def GetColumnNumber (self, columnName):
                """"""
                for row in range(1, self.maxRow + 1):
                        for column in range(1, self.maxColumn + 1):
                                if self.GetCellValue(column, row, "") == columnName:
                                        return column
                return 0
43495
function(cell)
	{
		var result = '';
		
		if (cell != null)
		{
			var parent = cell.getParent();
			
			while (parent != null)
			{
				var index = parent.getIndex(cell);
				result = index + mxCellPath.PATH_SEPARATOR + result;
				
				cell = parent;
				parent = cell.getParent();
			}
		}
		
		// Removes trailing separator
		var n = result.length;
		
		if (n > 1)
		{
			result = result.substring(0, n - 1);
		}
		
		return result;
	}
539450
def _sel_to_text(self, cell_range):
        """"""
        if not cell_range:
            return
        row_min, row_max, col_min, col_max = get_idx_rect(cell_range)
        if col_min == 0 and col_max == (self.model().cols_loaded-1):
            # we've selected a whole column. It isn't possible to
            # select only the first part of a column without loading more, 
            # so we can treat it as intentional and copy the whole thing
            col_max = self.model().total_cols-1
        if row_min == 0 and row_max == (self.model().rows_loaded-1):
            row_max = self.model().total_rows-1
        
        _data = self.model().get_data()
        if PY3:
            output = io.BytesIO()
        else:
            output = io.StringIO()
        try:
            np.savetxt(output, _data[row_min:row_max+1, col_min:col_max+1],
                       delimiter='\t', fmt=self.model().get_format())
        except:
            QMessageBox.warning(self, _("Warning"),
                                _("It was not possible to copy values for "
                                  "this array"))
            return
        contents = output.getvalue().decode('utf-8')
        output.close()
        return contents
1093531
def read_data(self, sheet, begin=None):
        
        line = self.begin
        rows = sheet.rows
        for i in range(line-1):
            rows.next()
        template_line = self.template[self.begin-1]
        if not template_line['subs']:
            raise ValueError("Template definition is not right")

        for row in rows:
            d = {}
            for c in template_line['subs'][0]['cols']:
                if c['field']:
                    cell = row[c['col']-1]
                    if isinstance(cell.value, (str, unicode)):
                        v = cell.value.strip()
                    else:
                        v = cell.value
                    d[c['field']] = v
            yield d