Extracting images from excel sheet by row with python
<p>I am trying to extract images from excel sheet. The excel sheet is basically a list of products with images and details of products.</p>

<p>with</p>

<pre><code>EmbeddedFiles = zipfile.ZipFile(path).namelist()
ImageFiles = [F for F in EmbeddedFiles if F.count('.jpg') or F.count('.jpeg')]
</code></pre>

<p>I can extract all images at once but i cannot figure out a way to get images by row so that i could save products into database and add images to respective products.</p>

<p>I was using openpyxl to read from excel but that does not provide a way to get images. I can shift to other libraries.</p>

<p>What would be the best way to do this.</p>

<p>The <code>xlsx</code> file is indeed in compressed format, but that does not mean that you have to expand it to work with it. Let <code>openpyxl</code> do that for you. The library in its documentation mentions that it can handle this format pretty well.</p>

<p>So try opening the file and reading line by line using <a href="https://openpyxl.readthedocs.io/en/default/tutorial.html#loading-from-a-file" rel="nofollow">this</a>, <a href="https://openpyxl.readthedocs.io/en/default/tutorial.html#accessing-many-cells" rel="nofollow">this</a> and <a href="https://openpyxl.readthedocs.io/en/default/usage.html#read-an-existing-workbook" rel="nofollow">this</a> example found in the documentation</p>

python excel image