mah*_*001 4 html excel vba image
I have got my html file with html table with the embedded image using tag
[ img src="data:image/png;base64, ] . I would like to convert it to excel with image columns showing the actual image. When I open this html file in excel , the table is shown fine but the image is shown with red cross place holder as shown
Is there any way to convert this base64 encoded image to be displayed in excel cells ?
regards
小智 5
对上面彼得的答案的更新。我又花了一个小时左右才弄清楚如何处理这个问题。以下是如何构建 html 文件的示例:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="12345"
--12345
Content-Type: image/jpg;name="logo.jpg"
Content-Transfer-Encoding: base64
Content-ID: <logo.jpg@site.com>
/9j/4QAYRXhpZgAASUkqAAgAAAAAAAA...
--12345
Content-Type: text/html; charset="utf-8"
<html>
<!-- Your HTML -->
<!-- Somewhere in the HTML, replace your images with this, matching the content-id you created above -->
<img width="your width" height="your height" src="cid:logo.jpg@site.com" />
</html>
--12345--
Run Code Online (Sandbox Code Playgroud)
对于多个图像,可以多次执行此操作,只是使用不同的名称/内容 ID。您必须在末尾添加该行才能使其正常工作。