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
- character size when pasting a table range from excel to powerpoint with vba
- search and display vba 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
- convert the character code of the target file to shift_jis with the linux command and save
- access - please tell me how to convert the character code of mdb data from shift-jis to utf-8
- i want to convert the char type array to a character code and make it an int type array
- 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
- Python Opencv convert picture to character painting
- vba - i want to extract the middle part of the character string
- i want to convert an int number to a 4 character char
- [php] how to convert from character string to date type
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- python 3x - typeerror: 'method' object is not subscriptable
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - unresolved reference comes out in kotlin