def _get_cell(row, name, decimal=False):
  """Retrieves a cell from a row by name."""
  for cell in row.cells:
    if cell.name == name:
      if decimal:
        return cell.decimal_value[0]
      return cell.string_value[0]