如何让图像出现在Excel中给定图像的URL [英] How to get images to appear in Excel given image url
本文介绍了如何让图像出现在Excel中给定图像的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建一个csv文件,其中一列包含图像的URL(例如, www.myDomain.com/myImage.jpg
)。 >
我可以让Excel呈现此图像吗?
I'm creating a csv file with one of the columns containing an url of an image (e.g., www.myDomain.com/myImage.jpg
).
How I can get Excel to render this image?
推荐答案
Dim url_column As Range
Dim image_column As Range
Set url_column = Worksheets(1).UsedRange.Columns("A")
Set image_column = Worksheets(1).UsedRange.Columns("B")
Dim i As Long
For i = 1 To url_column.Cells.Count
With image_column.Worksheet.Pictures.Insert(url_column.Cells(i).Value)
.Left = image_column.Cells(i).Left
.Top = image_column.Cells(i).Top
image_column.Cells(i).EntireRow.RowHeight = .Height
End With
Next
这篇关于如何让图像出现在Excel中给定图像的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文