ENCODEURL function

The ENCODEURL function returns a URL-encoded string, replacing certain non-alphanumeric characters with the percentage symbol (%) and a hexadecimal number.

Notes: 

  • The ENCODEURL function is not available in Excel for the web or Excel for Mac.

  • The ENCODEURL function may appear in Excel for Mac's function gallery, but it relies on Windows operating system features, so it will not return results on Mac.

Syntax

ENCODEURL(text)

The ENCODEURL function syntax has the following argument.

  • Text    A string to be URL encoded.

Example

Here is a simple example, which references an Excel file on a Microsoft SharePoint server. 

=ENCODEURL("http://contoso.sharepoint.com/teams/Finance/Documents/April Reports/Profit and Loss Statement.xlsx")

 Which results in:

http%3A%2F%2Fcontoso.sharepoint.com%2Fteams%2FFinance%2FDocuments%2FApril%20Reports%2FProfit%20and%20Loss%20Statement.xlsx  

You can also use the ENCODEURL function in conjunction with the WEBSERVICE function. For example:

=WEBSERVICE("http://xml.weather.yahoo.com/forecastrss/"&ENCODEURL(B2)&"_f.xml")  

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

Expand your Office skills
Explore training
Got It
Get instant Excel help
Connect to an expert now
Subject to Got It terms and conditions

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×