'str' object has no attribute
<p>I'm trying to open a column in excel and move all the values from it's cells into a list. </p>

<pre><code>def open_excel(col, excel_file): 
   open_file = openpyxl.load_workbook(excel_file) 
   sheet_object = open_file.get_sheet_names()[0]
   cell_vals = []
   col_num = column_index_from_string(start_col)
   for cell in sheet_object.columns[col_num]: 
       cell_vals.append(str(cell.value))
</code></pre>

<p>After I run that I get the error: </p>

<pre><code>builtins.AttributeError: 'str' object has no attribute 'columns'
</code></pre>

<p>But I've already imported everything as well. </p>

<p>Here's what I've imported: </p>

<pre><code>import openpyxl 
from openpyxl.cell import get_column_letter, column_index_from_string
import numpy as np 
import matplotlib.pyplot as plt
</code></pre>