Extra and "double" double quotes when using carriage return in formulas

Copper Contributor

Hi, all.

I am attempting to copy Excel cell contents in a text file (for further use later).

However, when copying and pasting cells with formulas that contain both quotes ("") and carriage returns (either CHAR(13) or "Alt+Enter"), the result contains "extra" quotes at odd places.

For example, if formula is =[@Type] & [@[Callout Pipe 1]] (with no carriage returns), the result is (after pasting into Notepad):

SDMH12" CPP N IE= 320.8

Just as desired. However, we need a carriage return after "SDMH" (from column [@Type]), so if we simply add a carriage return (again, either CHAR(13) or "Alt+Enter") with this formula =[@Type] & CHAR(13) & [@[Callout Pipe 1]], pasting it in Notepad results in:

"SDMH

12"" CPP N IE= 320.8"

As can be seen, the return carriage worked, but my text now has three extra double quotes that weren't meant to be there.

Could anyone help me solve this problem?

Thanks in advance,

Edgar

2 Replies

@Edgar Soares

 

Hi all

I have the same issue. I need copy data from Excel to an ERP using copy/paste

 

A1 = AA

B2 = BB

A1&A2 is ok in Notepad++   : AABB

with A1&char(9)&B2 I have "AA ->BB"

 

I am also searching how to remove the double quotes

 

Thanks for help

 


@Edgar Soares wrote:

Hi, all.

I am attempting to copy Excel cell contents in a text file (for further use later).

However, when copying and pasting cells with formulas that contain both quotes ("") and carriage returns (either CHAR(13) or "Alt+Enter"), the result contains "extra" quotes at odd places.

For example, if formula is =[@Type] & [@[Callout Pipe 1]] (with no carriage returns), the result is (after pasting into Notepad):

SDMH12" CPP N IE= 320.8

Just as desired. However, we need a carriage return after "SDMH" (from column [@Type]), so if we simply add a carriage return (again, either CHAR(13) or "Alt+Enter") with this formula =[@Type] & CHAR(13) & [@[Callout Pipe 1]], pasting it in Notepad results in:

"SDMH

12"" CPP N IE= 320.8"

As can be seen, the return carriage worked, but my text now has three extra double quotes that weren't meant to be there.

Could anyone help me solve this problem?

Thanks in advance,

Edgar


 

 

 

@Edgar Soares 

 

Hi Edgar,

 

That's only using workarounds. It could be macro https://excel.tips.net/T002237_Getting_Rid_of_Extra_Quote_Marks_in_Exported_Text_Files.html. Or copy paste through Word, or first paste as value into another cell, copy it content in edit mode and paste into Notepad then. Perhaps something else. That's lot of posts about the issue, e.g. https://superuser.com/questions/324271/how-to-copy-multi-line-text-from-excel-without-quotes