title: Read from excel file that is open in Python
body: <p>I have a script which pulls data from excel files every few hours. However, if one of these excel files is open, I still want to be able to read from it.</p>
  <p>In python (openpyxl) i get permissions error when I attempt to do this.</p>
  <p>Below is what i've tried. I thought I could catch the exception and create a temp version of the file that I could read from.</p>
  <pre><code>try:
      read_from = load_workbook(fileName)
  except:
      tempFileName = &quot;directory\\temp &quot; + fileName + &quot;.xlsx&quot;
      open(tempFileName, 'wb').write(open(fileName, 'rb').read())
      read_from = load_workbook(tempFileName)
  </code></pre>
  <p>However I get the following error with even this:</p>
  <pre><code>----&gt; 6         open(tempFileName, 'wb').write(open(fileName, 'rb').read())
    7         read_from = load_workbook(tempFileName)
    8     read_sheet = read_from.active
  
  PermissionError: [Errno 13] Permission denied: 'directory\\testfile.xlsx'
  </code></pre>