Openpyxl. Max_columns giving error
<p>I'm using openpyxl-2.4.0-b1 and Python version 34. Following is my code:</p>

<p>from openpyxl import load_workbook
from openpyxl import Workbook</p>

<pre><code>filename= str(input('Please  enter the filename name, with the entire path and extension: '))
wb  = load_workbook(filename)
ws  = wb.worksheets[0]
row_main = 1

#Main Program starts here. Loop for the entire file
print ('Col =', ws.max_column())
while (row_main &lt;(ws.max_row())): #Process rows for each column
    print ('ROW =', row_main)
    row_main += 1
</code></pre>

<p>It runs into an error:
Traceback (most recent call last):
    print ('Col =', ws.max_column())
TypeError: 'int' object is not callable</p>

<p>I can't use <em>get</em> because it has been deprecated. Many thanks in advance. </p>

<p>As <code>max_column</code> is <code>property</code>, so just use the name to get its value:</p>

<pre><code>print('Col =', ws.max_column)
</code></pre>

<p>Also apply on <code>max_row</code>:</p>

<pre><code>while (row_main &lt; ws.max_row):
</code></pre>

python openpyxl