I want to send an HTTP request (GET transmission) from VBA, store the response as a character string in a variable, and send it to MsgBox. ? ? It becomes.
Perhaps it is garbled and I am trying to specify the character code using ADODB stream, but it doesn't work.
I'd be happy if you could teach me.
Dim httpReq As Object Dim strRes As String Set httpReq = CreateObject ("MSXML2.XMLHTTP") With httpReq .Open "GET", "Parameter URL", False .send strRes = .responseText End With Dim st As New ADODB.stream st.open Call st.WriteText (strRes) Dim sr As String sr = st.ReadText MsgBox sr st.close Set st = Nothing
Answer # 1
First, let's find out what the character code of the site is.
Display the source, and understand the character code by describing charset = UTF-8 or charset = Shift_JIS or charset = EUC-JP.
strRes = .responseText
There should be no problem.
strRes = StrConv (.responseBody, vbUnicode)
To convert to Unicode.
For EUC-JP, the following will be helpful.
I want to get EUC \ -JP HTML source with VBA and make it Shift \ -JIS [OKWAVE]
- i want to convert time (date type) to a character string with vba
- mysql - how to replace vbs characters and convert character codes
- convert the character code of the target file to shift_jis with the linux command and save
- vba - i want to extract the middle part of the character string
- comma separated character string by vba → array → alignment processing
- how to specify vba character type
- convert excel vba cells to range
- vba simple method to convert 2-digit day into 8-digit yyyymmdd
- search and display vba character string
- i want to convert an int number to a 4 character char
- access - please tell me how to convert the character code of mdb data from shift-jis to utf-8
- vba - how to convert to half size
- i want to get multiple character recognition results from inkpicture drawing with vba
- Python convert video to full character video
- Convert between character array, String class, StringBuffer in Java
- How to convert a picture into a character picture
- Python method to convert pictures to character painting
- i want to convert the char type array to a character code and make it an int type array
- vba - i want to pick up an arbitrary character string from many text files and list it
- with excel vba, the character in the cell is divided and displayed by line break