|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
VBA万岁 发表于 2014-11-20 11:35
这个问题现已经得到解决,详见吴姐的帖子第20楼及513楼):
不懂html也来学网抓(xmlhttp/winhttp+fiddl ...
以下test2代码可能有误——因为我没见过汉字的unicode码(即“\u”形式的编码),你能传一些汉字的unicode码上来测试吗?
Function GBKEnCode(strText)
Dim i, s
For i = 1 To Len(strText)
s = Hex(Asc(Mid(strText, i, 1)))
If Len(s) = 4 Then s = Left(s, 2) & "%" & Right(s, 2)
GBKEnCode = GBKEnCode & "%" & s
Next
End Function
Sub test2()
MsgBox Replace(GBKEnCode("HTTP://www.apabi.com/ValidateCode.aspx的"), "%", "\u00")
End Sub |
|