关于Office中对%20的转义问题,请知道的大侠帮忙一起想想招儿!
??? 在Excel或者Word中插入一個文件鏈接,如果文件名中有空格,一切正常,但是如果文件名中有"%20"這個子串,問題就來了,Excel和Word會把"%20"替換成空格,這下反而不對了!
??? 我試過將“%20”替換為“%2520”就像各種搜索引擎的作法一樣,但是好像Excel/Word并沒有象轉義%20那樣將%25轉義為“%”字符,因此轉化成URL的文件名成了abc%2520def.txt,難道Excel/Word只對%20轉義,而忽略其它的HEX值??同是Office的Outlook就正常地按照預期效果轉義了。
??? 也試過其它的轉義符,如: / , // , \ , \\ ,% 等均沒有效果。
??? 為了擴大問題被解決的可能性,將問題用英文recite如下:
??? How to avoid the replacement of "%20" with " " in the filename linked by Excel/Word:
??? Given a file named "abc%20def.txt"
1、 tried to substitute "%20" with "%2520" like most search engines do, but it seems that it doesn't work in Excel/Word, 'cause the filename comes out straightly as "abc%2520def.txt", while Outlook works properly to translate "abc%2520def.txt" to "abc%20def.txt". So I'm afraid that it may be a bug of MS Excel/Word not to translate substrings prefixed with '%' except "%20", or there may be an option to be set in Excel/Word ??
2、 we tried out the possible Escape Chars including / , // , \ , \\ , % , but in vain.
??? Any suggestion? THX In Advance!
轉載于:https://www.cnblogs.com/rexhost/archive/2005/01/05/86563.html
總結
以上是生活随笔為你收集整理的关于Office中对%20的转义问题,请知道的大侠帮忙一起想想招儿!的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MapPoint之旅(2)-----Ge
- 下一篇: 寂寞山庄