Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

How to insert image into the excel report?

Avatar
odoo
Avatar
Discard
2 Answers
0
Avatar
odoo
Best Answer

Hi,

You can add the images to excel report like this,

if product.image_medium:
product_image = io.BytesIO(base64.b64decode(product.image_medium))
sheet.insert_image(row, col, "image.png", {'image_data': product_image})

Thanks

Avatar
Discard
0
Avatar
odoo
Best Answer

thank you Niyas but how to resize image ?

1 Comment
Avatar
Discard
Avatar
odoo
-

sheet.insert_image('B1', product_image, {'x_scale': 0.6, 'y_scale': 0.8})