用 Excel 中的图像名称替换图像
Replace image with image name in Excel
我有一个电子表格,其中一列包含图像。当我点击图片时,我可以在左上角看到图片名称。
我希望它的名称出现在列中,而不是图像。我无法手动执行此操作,因为有超过 10000 行。有没有办法在列中获取图像名称?
那你可以试试这个,我希望它对你有用。
Sub ImageNamesInCells()
Dim i As Integer
Dim actSheet As Worksheet
Dim aShape As Shape
Set actSheet = ActiveSheet 'or better ThisWorkBook.sheets("SheetName")
For Each aShape In actSheet.Shapes
oneShape.TopLeftCell = oneShape.Name 'assuming that TopLeftCell refers to the cell where the image is.
Next
End Sub
祝你好运!
我有一个电子表格,其中一列包含图像。当我点击图片时,我可以在左上角看到图片名称。
我希望它的名称出现在列中,而不是图像。我无法手动执行此操作,因为有超过 10000 行。有没有办法在列中获取图像名称?
那你可以试试这个,我希望它对你有用。
Sub ImageNamesInCells()
Dim i As Integer
Dim actSheet As Worksheet
Dim aShape As Shape
Set actSheet = ActiveSheet 'or better ThisWorkBook.sheets("SheetName")
For Each aShape In actSheet.Shapes
oneShape.TopLeftCell = oneShape.Name 'assuming that TopLeftCell refers to the cell where the image is.
Next
End Sub
祝你好运!