unable to open excel document using Python through openpyxl
<p>I'm new to Python, so sorry if this is annoyingly simple. I'm trying to simply open an excel document using this,</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>import openpyxl
from openpyxl.reader.excel import load_workbook
wb = openpyxl.load_workbook('C:\Users\ my file location here.xlsx') #with my real location</code></pre>
</div>
</div>
</p>

<p>I didn't get any error, however i don't understand why file doesn't open ?</p>

<p>The location of the file is correct as I can open it using, </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>file = "C:\Users\ my file location here.xlsx"
# os.startfile(file)</code></pre>
</div>
</div>
</p>

<p>Thanks</p>

<p>you incorrectly invoke the load_workbook function</p>

<p><code>wb = openpyxl.load_workbook('C:\Users\ my file location here.xlsx') #with my real location</code></p>

<p>you should use just load_workbook</p>

<p><code>wb = load_workbook('C:\Users\ my file location here.xlsx') #with my real location</code></p>

python excel