在excel中将奇怪的字符和符号转换为普通语言

问题描述

我正在使用 VBA 代码将信息从网站提取到 excel 单元格中,数字信息很好,但我对文本字符串有问题。我主要是从格鲁吉亚网站提取信息,格鲁吉亚语言的文本在 excel 中没有正确显示,所以我想知道是否有任何机会(代码或其他东西)我可以将这些符号转换为正确的语言。

Sub GetData()

Dim request As Object
Dim response As String
Dim html As New HTMLDocument
Dim website As String
Dim price As Variant
Dim address As Variant
Dim x As Integer
Dim y As Range

x = 1
Do Until x = 9
    Set y = Worksheets(1).Range("A21:A200"). _
    Find(x,LookIn:=xlValues,lookat:=xlWhole)
    website = "https://www.myhome.ge/ka/pr/11247371/iyideba-Zveli-ashenebuli-bina-veraze-T.-WoveliZis-qucha"
    
' Create the object that will make the webpage request.
Set request = CreateObject("MSXML2.XMLHTTP")

' Where to go and how to go there.
request.Open "GET",website,False

' Get fresh data.
request.setRequestHeader "If-Modified-Since","Sat,1 Jan 2000 00:00:00 GMT"

' Send the request for the webpage.
request.send

' Get the webpage response data into a variable.
response = StrConv(request.responseBody,vbUnicode)

' Put the webpage into an html object.
html.body.innerHTML = response

' Get info from the specified element on the page.
address = html.getElementsByClassName("address").Item(0).innerText
price = html.getElementsByClassName("d-block convertable").Item(0).innerText
  
y.Offset(0,1).Value = address
y.Offset(0,5).Value = price

x = x + 1

Loop

End Sub

这是我从 youtube 视频 (https://www.youtube.com/watch?v=IOzHacoP-u4) 中获取并稍加修改的代码,它有效,我只是对 excel 如何显示文本字符串中的字符有疑问。

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)