批量修改excel中超链接
打开需要处理的excel文件
alt + F11打开VB编辑器
双击打开对应的sheet
编辑如下代码
Dim oldfile As String
Dim Newfile As String
Sub RemoveHyperLinks()
oldfile="旧文件路径"
Newfile="新文件路径"
For Each hlink In Cells.Hyperlinks
hlink.Address = Replace(hlink.Address,oldfile,Newfile)
Next
End Sub
关闭VB编辑器,回到excel主界面
alt + F8调出宏对话框
选择“RemoveHyperLinks”运行
检查替换效果