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 編碼字串,以百分比符號 (%) 和十六進位數位取代特定非字母數位字元。

附註: 

  • ENCODEURL 函數不適用於 Excel 網頁版 或 Mac 版 Excel。

  • ENCODEURL 函數可能會出現在 Mac 版 Excel 函式程式庫中,但Windows作業系統功能,因此不會在 Mac 上返回結果。

語法

ENCODEURL(文字)

ENCODEURL 函數語法具有下列引數。

引數

描述

文字   

必要

要編碼 URL 的字串

範例

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

=ENCODEURL ("HTTP://contoso.sharepoint.com/Finance/Profit 和損失Statement.xlsx")

 結果為:

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

您也可以將 ENCODEURL 函數與 WEBSERVICE函數一起使用。 例如,您可以使用 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!

×