我在 excel 列中拥有数千个 URL,并且希望进行查找,然后自动将图像插入到 URL 名称右侧的单元格中...这可以在 excel 或 google 表格中完成吗?
答案1
假设图片链接在列中A。
首先打开浏览器,然后运行这个简短的宏:
Sub InstallPictures_2()
Dim i As Long, v As String, shp As Shape
For i = 1 To 1000
v = Cells(i, "A").Value
If v = "" Then Exit For
With ActiveSheet.Pictures
.Insert(v).Select
Set shp = ActiveSheet.Shapes(Selection.Name)
shp.Top = Cells(i, "B").Top
shp.Left = Cells(i, "B").Left
shp.Height = 100
shp.Width = 100
End With
Next i
End Sub
例如: