在日常工作中提升工作效率也是很重要的,毕竟摸鱼才是赚钱,上班是不可能上班的,这辈子都不可能上班的

1.准备好导出的文档,必须包含图片链接



图片链接这个是可以直接复制到浏览器,是可以直接展示到网页上面

2.图片链接准备好之后,找到WPS的开发工具选项或者是微软的EXCEL的软件,点击查看代码


找到对应的表格选项双击点开代码框


将下面的代码复制到上面去

Option Explicit

Dim rng As Range

Dim cell As Range

Dim Filename As String

Sub URLPictureInsert()

Dim theShape As Shape

Dim xRg As Range

Dim xCol As Long

On Error Resume Next

Application.ScreenUpdating = False

' Set to the range of cells you want to change to pictures

Set rng = ActiveSheet.Range("A2:A600")

For Each cell In rng

Filename = cell

' Use Shapes instead so that we can force it to save with the document

Set theShape = ActiveSheet.Shapes.AddPicture( _

Filename:=Filename, linktofile:=msoFalse, _

savewithdocument:=msoCTrue, _

Left:=cell.Left, Top:=cell.Top, Width:=60, Height:=60)

If theShape Is Nothing Then GoTo isnill

With theShape

.LockAspectRatio = msoTrue

' Shape position and sizes stuck to cell shape

.Top = cell.Top + 1

.Left = cell.Left + 1

.Height = cell.Height - 2

.Width = cell.Width - 2

' Move with the cell (and size, though that is likely buggy)

.Placement = xlMoveAndSize

End With

' Get rid of the

cell.ClearContents

isnill:

Set theShape = Nothing

Range("A2").Select

Next

Application.ScreenUpdating = True

Debug.Print "Done " & Now

End Sub


这里是指列如果是B列开始就填写B,结束的数字是指最后一行的数字,比如图片链接在A列,共有3000行的话这里就需要改成A2:A3000即可最后点击运行



耐心等待就可以了,希望小编的这个小技巧可以帮到你,给给关注哦!