Ask Your Question
1

How do I copy a cell without CR and LF being appended to end?

asked 2015-03-23 20:44:05 +0200

LBS Guy gravatar image

When I click on a Calc cell and hit ctrl-c (or cmd-c), it copies the contents of that cell to the clipboard as expected. BUT, it also appends two additional characters to the end of the copied contents: a carriage return (CR, ASCII dec. code 13) and a linefeed (LF, ASCII dec. code 10). Since I've been experiencing this for a while, and on both Windows and Mac platforms, I'm assuming this is by design. Is there a setting that would allow me to change this behavior so that it just includes the contents of the cell? (I know I can copy from the cell editing box and get just the contents but for my use that is too cumbersome a workaround.) Also, why does it add these?

edit retag flag offensive close merge delete

Comments

Try the following sequence of keys:

  1. If the cell contains a value - F2->Ctrl+Home->Ctrl+C (or cmd-c)->Esc

  2. If the cell contains a formula - F2->F9->Enter->Ctrl+C (or cmd-c)->Esc

Yes, it will require extra keypresseds. Simply press Backspace after insertion.

Perhaps your problem can solve simple macro that will delete all line breaks from the text in the clipboard

JohnSUN gravatar imageJohnSUN ( 2015-03-24 10:02:57 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2018-05-30 01:19:22 +0200

updated 2018-05-30 02:01:19 +0200

I have come across this issue too. Presumably somebody coded this 'by design' but if it was, I argue that this is actually a bug (by design) in LO Calc. The (text) contents of the cell does not include a CR LF, so why would that be appended to the text that you have copied?

Thanks @JohnSUN for your suggestion (Simply press Backspace after insertion). It seems the best workaround to me.

edit flag offensive delete link more

Comments

Your question isn't an answer so should rather be a comment..

Anyway, pasting a copy of cell(s) to raw text creates TSV (Tab Separated Values), getting newlines appended, which for multiple rows makes much sense.. for a single cell (which also is a single row) the same happens but maybe should not.

erAck gravatar imageerAck ( 2018-05-30 18:58:10 +0200 )edit
0

answered 2016-02-25 20:18:23 +0200

Best I've come up with on Windows (maybe Mac too) is triple-click to select all text then copy and paste. Not too bad but it's tough when you're used to Excel, or worse, switching between LibreOffice and Excel.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-03-23 20:44:05 +0200

Seen: 1,755 times

Last updated: May 30 '18