dherr
10-18-2015, 08:18 AM
Hi,
I do the following:
In a Website I mark a table with data (some data in Unicode characters), then copy this to the clipboard, then paste it into a Excel sheet.
All goes right, also the Unicode characters are in the cells.
Now the problem:
I try to automate this via VBA. I read the source code of the Website and extract the table data. The extraction works via:
Dim src as String
I use now a function:
Public Function GetPageSourceCode(url As String) As String
' tools > references > select Windows Win Http Services 5.1
' to get data from the url we need to create a win Http object
Dim myHttp As New WinHttpRequest
With myHttp
.Open "GET", url, False 'open the url
.Send ' send request
GetPageSourceCode = .ResponseText
End With
End Function
and
src = GetPageSourceCode(myUrl)
Now the Unicode characters are gone!!!
I can insert the data into the cells with wrong characters only...
What can I do to get the right Unicode characters in my Excell cells?
Regards
Dietrich
I do the following:
In a Website I mark a table with data (some data in Unicode characters), then copy this to the clipboard, then paste it into a Excel sheet.
All goes right, also the Unicode characters are in the cells.
Now the problem:
I try to automate this via VBA. I read the source code of the Website and extract the table data. The extraction works via:
Dim src as String
I use now a function:
Public Function GetPageSourceCode(url As String) As String
' tools > references > select Windows Win Http Services 5.1
' to get data from the url we need to create a win Http object
Dim myHttp As New WinHttpRequest
With myHttp
.Open "GET", url, False 'open the url
.Send ' send request
GetPageSourceCode = .ResponseText
End With
End Function
and
src = GetPageSourceCode(myUrl)
Now the Unicode characters are gone!!!
I can insert the data into the cells with wrong characters only...
What can I do to get the right Unicode characters in my Excell cells?
Regards
Dietrich