title: Speed up openpyxl reading
body: <p>I am working on a quite large program that is taking data from again, quite a large excel spreadsheet. 
  For some strange reason it takes though ages to load this big excel file, and I was hoping to speed it up somehow. 
  I did my own research and tried read_only, but that didnt allow me to read any cells (at least the way shown below). Any suggestions would be highly welcome.</p>
  
  <pre><code>def LoadSheet(Filename,worksheet_nr):
      import time as t
      st = t.clock()
      wb = xl.load_workbook(str(Filename))#workbook, loading workbook
      Sheets = wb.get_sheet_names()#Worksheets, shows all sheets in the workbook loaded
      ActiveSheet = wb.get_sheet_by_name(Sheets[worksheet_nr])#Selects the first sheet
      print round(t.clock() - st,3), "seconds of loading time."
      print "Sheet is loaded and reading..."
      return ActiveSheet
  
  
  
  def CountRC_nr(ActiveSheet, StartR,StartC):
      R = StartR#Selected starting Row number
      C = StartC#Selected starting Column number
      Val = None #Value in cell (Right now, none is selected, thus zero value)
      while (Val != "None"):
          Val = str(ActiveSheet.cell(row=R,column=C).value)
          R += 1
  
      NumberRows = R - StartR - 1
      Val = None
      R=StartR
  
      while (Val != "None"):
          Val = str(ActiveSheet.cell(row=R,column=C).value)
          C += 1
      NumberColumns = C - StartC - 1
  
      return NumberRows, NumberColumns
  </code></pre>
  
  <p>Since some of you requested to see how I used read_only, here the modified code:</p>
  
  <pre><code>def LoadSheet(Filename,worksheet_nr):
      import time as t
      st = t.clock()
      wb = xl.load_workbook(str(Filename), read_only = True)#workbook, loading workbook
      Sheets = wb.get_sheet_names()#Worksheets, shows all sheets in the workbook loaded
      ActiveSheet = wb.get_sheet_by_name(Sheets[worksheet_nr])#Selects the first sheet
      print round(t.clock() - st,3), "seconds of loading time."
      print "Sheet is loaded and reading..."
      return ActiveSheet
  
  
  
  def CountRC_nr(ActiveSheet, StartR,StartC):
      R = StartR#Selected starting Row number
      C = StartC#Selected starting Column number
      Val = None #Value in cell (Right now, none is selected, thus zero value)
      while (Val != "None"):
          Val = str(ActiveSheet.cell(row=R,column=C).value)
          R += 1
  
      NumberRows = R - StartR - 1
      Val = None
      R=StartR
  
      while (Val != "None"):
          Val = str(ActiveSheet.cell(row=R,column=C).value)
          C += 1
      NumberColumns = C - StartC - 1
  
      return NumberRows, NumberColumns
  </code></pre>