ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Web query and special characters (https://www.excelbanter.com/excel-programming/319452-web-query-special-characters.html)

David Sloman

Web query and special characters
 
Hi.

I've got a web query which goes off and translates a list of words
within a sheet - it works quite nicely, except any special characters
seem to get messed up in the process.

For example, if I navigate to the website directly and enter a word to
translate ("Invalid" in this example), I am correctly returned
"Unzulässig". However in Excel this gets changed to
"Unzulässiger".

Anyone have any ideas what I can try to get the correct character
formatting?

Many thanks


sriramna

Web query and special characters
 
I am trying a similar application (here I am fetching entire word lists
for flashcard training). I'm surprised more people haven't encountered
this problem.

There does not appear to be any hope for it except to post-process the
returned data. I recorded a macro for this:

Sub SubSpecialChars()
With Cells
..Replace What:="ä", Replacement:="ä", _
LookAt:=xlPart, _
SearchOrder :=xlByRows, MatchCase:=True, _
SearchFormat:=False, ReplaceFormat:=False

..Replace What:="ö", Replacement:="ö"

..Replace What:="ü", Replacement:="ü"
End With
End Sub

I'm afraid the substitutions were determined just by inspection; I
don't know of the logic for this.

David Sloman wrote:
Hi.

I've got a web query which goes off and translates a list of words
within a sheet - it works quite nicely, except any special characters
seem to get messed up in the process.

For example, if I navigate to the website directly and enter a word

to
translate ("Invalid" in this example), I am correctly returned
"Unzulässig". However in Excel this gets changed to
"Unzulässiger".

Anyone have any ideas what I can try to get the correct character
formatting?



R.VENKATARAMAN

Web query and special characters
 
sometimes when you download external data some unprintable characters from
the original page creep in. refer to this url

http://www.mvps.org/dmcritchie/excel/join.htm

you can even findout what speical characters have crept in by using
pearson's <cellview addin.

hope these will be of help to you

sriramna wrote in message
ps.com...
I am trying a similar application (here I am fetching entire word lists
for flashcard training). I'm surprised more people haven't encountered
this problem.

There does not appear to be any hope for it except to post-process the
returned data. I recorded a macro for this:

Sub SubSpecialChars()
With Cells
..Replace What:="ä", Replacement:="ä", _
LookAt:=xlPart, _
SearchOrder :=xlByRows, MatchCase:=True, _
SearchFormat:=False, ReplaceFormat:=False

..Replace What:="ö", Replacement:="ö"

..Replace What:="ü", Replacement:="ü"
End With
End Sub

I'm afraid the substitutions were determined just by inspection; I
don't know of the logic for this.

David Sloman wrote:
Hi.

I've got a web query which goes off and translates a list of words
within a sheet - it works quite nicely, except any special characters
seem to get messed up in the process.

For example, if I navigate to the website directly and enter a word

to
translate ("Invalid" in this example), I am correctly returned
"Unzulässig". However in Excel this gets changed to
"Unzulässiger".

Anyone have any ideas what I can try to get the correct character
formatting?






All times are GMT +1. The time now is 07:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com