title: Get column names of Excel worksheet with OpenPyXL in readonly mode
body: <p>How could I retrieve </p>
  
  <ol>
  <li>the column names (values of the cells in the first row) in an openpyxl <a href="https://openpyxl.readthedocs.io/en/stable/optimized.html" rel="noreferrer">Read-only</a> <strong>worksheet</strong>? 
  
  <ul>
  <li><code>City</code>, <code>Population</code>, <code>Country</code> in the below example worksheet</li>
  </ul></li>
  <li>all column names in an openpyxl Read-only <strong>workbook</strong>?
  
  <ul>
  <li><code>City</code>, <code>Population</code>, <code>Country</code>, frames from worksheet 1 and the other column names from all other worksheets</li>
  </ul></li>
  </ol>
  
  <p>Example Excel worksheet:</p>
  
  <pre><code>| City       | Population  |    Country   |
  | -----------|------------ | ------------ |
  | Madison    |   252,551   |     USA      |
  | Bengaluru  | 10,178,000  |    India     |
  | ...        |       ...   |     ...      |
  </code></pre>
  
  <p>Example code:</p>
  
  <pre><code>from openpyxl import load_workbook
  
  wb = load_workbook(filename=large_file.xlsx, read_only=True)
  sheet = wb.worksheets[0]
  
  ... (not sure where to go from here)
  </code></pre>
  
  <p>Notes:</p>
  
  <ul>
  <li>I have to use readonly because the Excel file has over 1 million rows (don't ask)</li>
  <li>I'd like the column names so I can eventually infer the column types and import the excel data into a PostgreSQL database</li>
  </ul>