解决从Excel复制粘贴到Outlook时自动添加引号的问题
解决Excel生成邮件内容粘贴到Outlook首尾出现引号的问题
问题场景
使用Excel 365的CONCAT函数拼接包含换行的邮件内容,复制并以「仅保留文本」粘贴到Outlook时,文本首尾会自动被添加双引号,手动删除效率低;尝试TRIM无效,CLEAN会删除换行符,且Google Sheets的CONCAT仅支持2个参数导致公式兼容问题。
公式化解决方案
方案1:嵌套MID函数精准去除首尾引号
针对复制时必然出现的首尾引号,直接在原CONCAT外层嵌套MID函数,截取掉首尾的引号:
=MID( CONCAT( "Biospecimens for ",Table1[@[First Name]],"'s ",PROPER(Table1[@[Focus Area]])," Research Hi ",Table1[@[First Name]],", Your work in ",Table1[@[Focus Area]]," at ", Table1[@[Company Name]]," caught my eye as someone that supports scientists in this space. I thought you'd find value in (redacted company name)'s high-quality biospecimens, "," such as blood, tissue, and cells. Our diverse sample types and indications can be customized to fit your specific requirements.", "Could we set up a meeting for next week? I’m free on Monday or Tuesday at 10am CST. I look forward to connecting with you. Have a fantastic day!" ), 2, LEN(CONCAT(...))-2 # 替换为原CONCAT的完整内容 )
说明:直接截取第2个字符到倒数第2个字符的内容,适合确定引号一定会出现的场景。
方案2:动态判断并去除首尾引号(通用型)
如果存在部分内容不会自动添加引号的情况,用LEFT和RIGHT判断首尾字符,动态调整截取范围:
=LET( originalText, CONCAT( "Biospecimens for ",Table1[@[First Name]],"'s ",PROPER(Table1[@[Focus Area]])," Research Hi ",Table1[@[First Name]],", Your work in ",Table1[@[Focus Area]]," at ", Table1[@[Company Name]]," caught my eye as someone that supports scientists in this space. I thought you'd find value in (redacted company name)'s high-quality biospecimens, "," such as blood, tissue, and cells. Our diverse sample types and indications can be customized to fit your specific requirements.", "Could we set up a meeting for next week? I’m free on Monday or Tuesday at 10am CST. I look forward to connecting with you. Have a fantastic day!" ), startPos, IF(LEFT(originalText,1)="""",2,1), endLen, LEN(originalText) - IF(LEFT(originalText,1)="""",1,0) - IF(RIGHT(originalText,1)="""",1,0), MID(originalText, startPos, endLen) )
说明:用LET函数(Excel 365支持)简化逻辑,先存储原始拼接文本,再动态判断是否需要去除首尾引号,避免误删正常字符。
方案3:替换为TEXTJOIN解决引号根源+兼容Google Sheets
引号出现的根源是Excel对含换行的单元格内容自动添加包裹引号,改用TEXTJOIN函数拼接,既能避免该问题,又能兼容Google Sheets(Google Sheets的TEXTJOIN支持多参数):
=TEXTJOIN("", TRUE, "Biospecimens for ",Table1[@[First Name]],"'s ",PROPER(Table1[@[Focus Area]])," Research Hi ",Table1[@[First Name]],", Your work in ",Table1[@[Focus Area]]," at ", Table1[@[Company Name]]," caught my eye as someone that supports scientists in this space. I thought you'd find value in (redacted company name)'s high-quality biospecimens, "," such as blood, tissue, and cells. Our diverse sample types and indications can be customized to fit your specific requirements.", "Could we set up a meeting for next week? I’m free on Monday or Tuesday at 10am CST. I look forward to connecting with you. Have a fantastic day!" )
说明:TEXTJOIN的第一个参数为空字符串(作为分隔符),第二个参数TRUE表示忽略空值,拼接后的文本复制到Outlook时不会自动添加首尾引号,且公式可直接在Google Sheets中运行。
额外小技巧
临时处理单个单元格时,可直接点击Excel编辑栏,选中编辑栏内的所有文本再复制,也能避免带出自动添加的引号。
内容的提问来源于stack exchange,提问作者Joanna Raygoza
相关产品推荐
相关产品推荐

