|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Function GetURL$(txt$)
'Dim a() As Byte
'a = StrConv(txt, vbFromUnicode, &H804)
For i = 1 To Len(txt)
txt1 = Mid(txt, i, 1)
If Abs(Asc(txt1)) < 128 Then
GetURL = GetURL & txt1
Else
GetURL1 = Application.Hex2Bin(Left(Hex(AscW(txt1)), 2), 8)
GetURL1 = GetURL1 & Application.Hex2Bin(Right(Hex(AscW(txt1)), 2), 8)
GetURL1 = Application.Replace(Application.Replace(GetURL1, 11, , 10), 5, , 10)
GetURL2 = "%E" & Application.Bin2Hex(Left(GetURL1, 4))
GetURL2 = GetURL2 & "%" & Application.Bin2Hex(Mid$(GetURL1, 5, 8))
GetURL2 = GetURL2 & "%" & Application.Bin2Hex(Mid$(GetURL1, 13, 8))
GetURL = GetURL & GetURL2
End If
Next
End Function
|
评分
-
1
查看全部评分
-
|