title: Python and Excel - OpenPyXL
body: <p>I am working with Excel using Python and have couple of questions: <br>
  <br></p>
  <ol>
  <li>Loading Excel Sheet into 2d Array.<br>
  In VBA I'd simply do:</li>
  </ol>
  <pre><code>dim arrData as Variant 
  arrData = shtData.Range(&quot;A1:E2500&quot;) 
  </code></pre>
  <p>I would get array(1 to 2500, 1 to 5), which i can easily access for example arrData(1,5) -&gt; row 1 column 5 <br></p>
  <p>In Python what i managed to do is: <br></p>
  <pre><code>#declare list
  excel_data=[]
  
  #loop to load excel spreadsheet data into 2d Array   
  #basically I am looping through every row and append it to list
  for row in shtData.iter_rows(min_row=5, max_row=50,values_only =True):
      excel_data.append(row)
  </code></pre>
  <ol start="2">
  <li><p>Is there a way to assign row to list, starting from index 1 not 0? <Br>
  In VBA there is an option Option Base 1. <br>
  <a href="https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/option-base-statement" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/option-base-statement</a> <br></p>
  </li>
  <li><p>Is it the fastest way to operate on Excel Dataset? <br>
  I am planning then to loop through let's say 2500 rows and 5 columns -&gt; 12'500 cells. <br>
  With VBA it was very efficient to be honest (operating on array in memory). <br></p>
  </li>
  <li><p>As I understand, functionsof OpenPyXL: <br></p>
  </li>
  </ol>
  <pre><code>load_workbook       
  </code></pre>
  <p>#only creates REFERENCE TO EXCEL WORKBOOK - it does not open it? or is it &quot;loaded&quot; into memory but what is on the HD is actually intact?</p>
  <pre><code>shtData = wkb.worksheets[0]                         
  </code></pre>
  <p>#again only reference?</p>
  <pre><code>shtReport = wkb.create_sheet(title=&quot;ReportTable&quot;)       
  </code></pre>
  <p>#it adds sheet but it adds it in excel which is loaded into memory, only after saving, Excel on HD is actually overwritten?</p>