0

So if I have a cell that contains abc and I copy the entire cell into say SQL server it always includes another line ie:

'abc
' 

Instead of

'abc'

If I double click in the cell and highlight the data it will appear correctly. All this time I have just been putting up with this annoyance but surely there has got to be a way I can click just the cell, and copy the entire cell without the line break??? I have googled too much over this and could not find anything other than how to add/remove page breaks which does not help.

I should add that the '' marks are already in SQL so when I paste a cell between the '' it puts the last ' on the new line

user3486773
  • 1,174
  • 3
  • 25
  • 50
  • I edited to make more sense as I could see the confusion. the cell contains ABC.... not 'ABC' the hash marks are in SQL and I just want to paste between them without the line break. – user3486773 Sep 17 '14 at 22:44
  • Possible duplicate of [MS Excel adds line break when copying a cell](http://stackoverflow.com/questions/14695836/ms-excel-adds-line-break-when-copying-a-cell) – Scarabee Jan 31 '17 at 13:36

1 Answers1

0

What you need to do is use regular expression to replace 'space' with 'no space'

Using Qt: replace(QRegExp("\s"), "");