在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!