我有一個SQL表中有一些字段,其中一個字段是一個URL。 我需要在excel中顯示錶中的所有信息,但我希望URL字段顯示URL指向的圖像而不是URL本身。如何在Excel中的某個URL上顯示圖像?從Excel中的URL獲取圖像
0
A
回答
1
這是VBA中微軟所做的非常簡單的事情之一。
如果你想插入從URL的代碼是一個畫面:
ActiveSheet.Pictures.Insert("http://i.imgur.com/9W8Pb1V.png").Select
這將插入一個兔子的照片與它的頭一個煎餅到您的工作簿中的activesheet。
1
從JNevill's回答... 2012年,Andrew Poulsom給出了一個完整的宏,用於將給定單元格中的URL添加到下一個單元格中的圖像...由於URL在單元格A2中,被放置在電池B2:
Sub Test()
Dim Pic As Picture
Application.ScreenUpdating = False
With ActiveSheet.Range("A2")
Set Pic = .Parent.Pictures.Insert(.Value)
With .Offset(, 1)
Pic.Top = .Top
Pic.Left = .Left
Pic.Height = .Height
Pic.Width = .Width
End With
End With
Application.ScreenUpdating = True
End Sub
相關問題
- 1. Excel VBA從url獲取圖像
- 2. 從Android中獲取URL中的圖像
- 3. 使用file_get_contents從url中獲取圖像
- 4. 從url中獲取圖像爲空值
- 5. ListView中從url獲取圖像
- 6. 從URL中獲取所有圖像
- 7. 從URL獲取圖像 - 像Facebook一樣
- 8. 在PHP中獲取圖像的URL url
- 9. 通過從S3獲取圖像的URL從S3顯示圖像
- 10. 如何從圖像url中獲取圖像數據
- 11. 無法從函數獲取圖像URL
- 12. 從RSS數據獲取圖像url
- 13. 從Top.Images對象獲取圖像URL
- 14. Python:從URL獲取圖像尺寸
- 15. 從URL獲取多個圖像[PHP]
- 16. 從url獲取圖像代碼,Javascript
- 17. 從URL /服務器獲取圖像
- 18. 從URL獲取EarthEngine圖像到geoTIFF
- 19. 從Facebook獲取圖像名稱image url
- 20. 使用BeautifulSoup從URL獲取圖像
- 21. 從https url獲取圖像ios
- 22. 使用Paperclip從URL獲取圖像
- 23. 從網絡獲取圖像URL
- 24. 使用javascript從jquery獲取圖像url
- 25. JQuery:從url獲取圖像元素
- 26. Android從url獲取圖像SingleClientConnManager問題
- 27. 從url獲取圖像文件對象
- 28. 從JSON獲取圖像URL到數組
- 29. Mediawiki圖像URL獲取
- 30. 獲取JSON,圖像URL
這是原來的線程http://www.mrexcel.com/forum/excel-questions/604604-insert-image-url-images-into-cells.html#post2997091 – Gready