ENCODEURL function
This article describes the formula syntax and usage of the ENCODEURL function in Microsoft Excel.
Note: The ENCODEURL function is not available in Excel Online, and it is not available in Excel 2016 for Mac.
Description
Returns a URL-encoded string.
Syntax
ENCODEURL(text)
The ENCODEURL function syntax has the following arguments.
-
Text A string to be URL encoded.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
XML Response: | Zip code: | |
=WEBSERVICE("http://xml.weather.yahoo.com/forecastrss/"&ENCODEURL(B2)&"_f.xml") | 98052 | |
Place: | =FILTERXML(A2,"//yweather:location/@city") | =FILTERXML(A2,"//yweather:location/@region") |
Current conditions: | =FILTERXML(A2,"//yweather:condition/@temp") | =FILTERXML(A2,"//yweather:condition/@text") |
Forecast: | =FILTERXML(A2,"//yweather:forecast/@day") | =FILTERXML(A2,"//yweather:forecast/@text") |
=FILTERXML(A2,"//yweather:forecast/@day") | =FILTERXML(A2,"//yweather:forecast/@text") | |
=FILTERXML(A2,"//yweather:forecast/@day") | =FILTERXML(A2,"//yweather:forecast/@text") | |
=FILTERXML(A2,"//yweather:forecast/@day") | =FILTERXML(A2,"//yweather:forecast/@text") | |
=FILTERXML(A2,"//yweather:forecast/@day") | =FILTERXML(A2,"//yweather:forecast/@text") | |
Description | ||
This example uses the ENCODEURL function to pass the zip code in cell B2 as a parameter to the web query in A2. The FILTERXML function is used on the web query to return city and state information, and current and projected weather conditions for that zip code in cells B6:C13. |
No comments:
Post a Comment