小编С. *_*цэг的帖子

Excel 报告中的图像

求助,如何打印图像Excel报告?请帮我?我用xlsxwriter。 xlsxwriter 的示例 这是我的代码:

product_image = product_product.product_tmpl_id.image
imgdata = base64.b64decode(product_image)
image = Image.open(io.BytesIO(imgdata))
# imgdata = base64.b64decode(product_image)
# image =  io.BytesIO(imgdata)
print type(image)
sheet.insert_image(rowx, 12, str(image))
Run Code Online (Sandbox Code Playgroud)

错误是:

warn("Image file '%s' not found." % force_unicode(filename))
Run Code Online (Sandbox Code Playgroud)

怎么解决?我的目标是在 odoo 中打印产品图像。

image report xlsx odoo

1
推荐指数
1
解决办法
2229
查看次数

标签 统计

image ×1

odoo ×1

report ×1

xlsx ×1