Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default unescape a URL

Is there a better way to unescape a URL? For now I'm getting by with
this but I'd like something more generic.

Thanks.

Function unescape(s As String)
s = Application.Substitute(s, "%20", " ")
s = Application.Substitute(s, "%3A", ":")
s = Application.Substitute(s, "%5C", "\")
unescape = s
End Function

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default unescape a URL

why not use the array formula
try:
=SUBSTITUTE(URL,{"%20","%3A","%5C"},{" ",":","\"})
HTH

--
Regards,

Sebation.G

groups.com...
Is there a better way to unescape a URL? For now I'm getting by with
this but I'd like something more generic.

Thanks.

Function unescape(s As String)
s = Application.Substitute(s, "%20", " ")
s = Application.Substitute(s, "%3A", ":")
s = Application.Substitute(s, "%5C", "\")
unescape = s
End Function



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default unescape a URL

It has to be a VBA solution. Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default unescape a URL

replace


--
Don Guillett
SalesAid Software

wrote in message
ups.com...
It has to be a VBA solution. Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default unescape a URL

There's the API call to UrlUnescape:
http://msdn2.microsoft.com/en-us/library/ms628645.aspx

And also its partner UrlEscape.

NickHK

wrote in message
oups.com...
Is there a better way to unescape a URL? For now I'm getting by with
this but I'd like something more generic.

Thanks.

Function unescape(s As String)
s = Application.Substitute(s, "%20", " ")
s = Application.Substitute(s, "%3A", ":")
s = Application.Substitute(s, "%5C", "\")
unescape = s
End Function





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"