Skip to navigation
Insert an image from a url to the openpyxl excel file
28.03.16
import openpyxl from openpyxl.writer.excel import save_virtual_workbook from openpyxl.drawing.image import Image import PIL import io import urllib3 wb = openpyxl.Workbook() ws = wb.active r = 1 ws['A1'] = 'test' http = urllib3.PoolManager() r = http.request('GET', 'http://myridia.com/assets/images/logo.png') image_file = io.BytesIO(r.data) img = Image(image_file) ws.add_image(img, 'A2')
http://urllib3.readthedocs.org/en/latest/index.html
Reply
Anonymous
Information Epoch 1746896568
Distrust all claims for one true way.
Home
Notebook
Contact us