Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

ENCODEURL 函數會傳回 URL 編碼字串,以百分比符號 (%) 和十六進位數位取代特定非英數位元字元。

附註: 

  • Excel 網頁版 或 Mac 版 Excel 不提供 ENCODEURL 函數。

  • ENCODEURL 函數可能會出現在 Mac 版 Excel 的函數庫中,但它仰賴 Windows 操作系統功能,因此不會在 Mac 上傳回結果。

語法

ENCODEURL(文字)

ENCODEURL 函數語法具有下列自變數。

引數

描述

文字   

必要

要編碼 URL 的字串

範例

以下是一個簡單的範例,其中參照 Microsoft SharePoint 伺服器上的 Excel 檔案。 

=ENCODEURL (“http://contoso.sharepoint.com/Finance/Profit and Loss Statement.xlsx”)

 結果如下:

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

您也可以搭配 WEBSERVICE 函數使用 ENCODEURL 函數。 例如,您可以使用 markitondemand.com api 服務傳回公司股票的相關信息:

=WEBSERVICE (“http://dev.markitondemand.com/MODApis/Api/Quote/xml?symbol=”&ENCODEURL (C2) )

單元格 C2 中有股票股票看板的位置。

接著,您可以使用 FILTERXML 函數 來擷取該股票的特定數據。 例如,若要在儲存格 C2 中取得股票股票看板的姓氏,您可以使用:

=FILTERXML (WEBSERVICE (“http://dev.markitondemand.com/MODApis/Api/Quote/xml?symbol=”&ENCODEURL (C2) ) ,“//QuoteApiModel/Data/LastPrice”)

需要更多協助嗎?

您可以隨時詢問 Excel 技術社群中的專家,或在社群中取得支援。

另請參閱

FILTERXML 函數

WEBSERVICE 函數

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×