用这个自定义函数
Public Function UrlDecode(ByVal strText As String) As String '如果值中带有非英文和数字,则需转换成%形式
'url编码 utf-8
Dim js
Set js = CreateObject("msscriptcontrol.scriptcontrol")
js.Language = "JavaScript"
'UrlDecode = js.eval("decodeURI('" & strText & "');") '忽略! @ # $& * ( ) = : / ; + '
'UrlEncode = js.Eval("escape('" & Replace(strText, "'", "\'") & "');") '汉字转换为%u开头的Unicode码 不会被此方法编码的字符: @ * / +
UrlDecode = js.Eval("decodeURIComponent('" & strText & "');") '包含://
End Function
欢迎到EXCEL880工作室来看实例视频