We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

Libre Calc: How to get rid of additional "paragraph break" when copy cell data

asked 2020-11-27 12:41:35 +0200

tmpacc gravatar image

updated 2020-11-27 15:34:56 +0200

When I copy cell data from some Libre Calc cell, it adds an line feed (CRLF) to the copied data/text. This shows when pasting in any another application.

With that: Inserted/pasted data/string to cell != copied data/string from cell

someTypedTextToCopy => someTypedTextToCopyCRLF

Can I disable this behaviour somehow?

  • Both W10 and Linux Debian shows this behaviour.
  • For new sheet, when you type or paste some text no matter what cell formatting/default applied.
  • Only when you highlight/select the text inside the cell, there won't be additional CRLF on copied value(but prone to human errors/missing chars, while extra actions to be executed by user)

It is really annoying that data in != data out, and it puts an unnecessarily amount of extra load to the user removing that CRLF again when processing up to 1k of cells towards multiple applications(Ofc. expensive programs by bignames, with very limited import functionality, and lovely binary blobs)

edit retag flag offensive close merge delete

Comments

It is really annoying that data in != data out

please show us a sample file marking a cell whose copying causes a CRLF to be added and I'm pretty sure someone will show you that original data already contains that (or you have a dysfunctional clipboard manager in use). Never faced a problem LibreOffice adding something to copied data.

Opaque gravatar imageOpaque ( 2020-11-27 13:09:12 +0200 )edit

(Much too many irrelevant tags. Only calc and writer are relevant - and probably paste.)
Your question misses at all that you would expect a different result when pasting.
May I guess you wanted to ask:

"If I copy a cell from a spreadsheet, and paste then into a text document, I get an unwanted paragraph break at the end. How to avoid this?"

My answer would have been:

For the pasting step use Paste Specieal... selecting Unformatted text. You can do so using the default shortcut Ctrl+Sift.V for Paste Special..., and then pressing the U key to select Unformatted text.U.

Lupp gravatar imageLupp ( 2020-11-27 13:17:38 +0200 )edit

"data in = data out" generally isn't applicable to the usage of copy/paste with the help of the clipboard (or respective internal means of a software). A clipboard needs to regard "flavors" because the objects being concerned with keeping and displaying data often depend heavily on circumstances the user doesn't take in account in a realistic way.
What comes next to a cell's displayed content when moved to a text document is a paragraph, and this way it's treated.
If a cell range was copied, Writer would assume a user calling Ctrl+V while a text document is active to expect a table to be inserted, and will choose the "table flavor"...

Lupp gravatar imageLupp ( 2020-11-27 13:26:36 +0200 )edit

This happens on multiple systems BareMetal/Virtual machine WIn/Tux, no difference on a New Sheet (default behaviour)

tmpacc gravatar imagetmpacc ( 2020-11-27 13:39:57 +0200 )edit

Copy+Paste/Special does not apply, since the raw data/string inserted to Calc needs to be pasted (raw as inserted to calc) in another application by me or someone else

tmpacc gravatar imagetmpacc ( 2020-11-27 13:48:50 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-11-27 14:05:10 +0200

Lupp gravatar image

updated 2020-11-27 14:12:25 +0200

Well, I neither understand clearly the updated question nor the comment following my own comments on the question.

Anyway:
The behavior of any clipboard or of the way any software chooses the flavor being supposed to be most suitable for pasting, will not be controllable by the user genarally. He simply wouldn't understand the implications in most cases.

If a software is ordered to paste something, it needs to choose a flavor as default, and it may offer a choice to the user depending on the siruation.
LibreOffice will bring up that choice if you called Paste Special... (Ctrl+Shift+V).
In the given case, having copied a spreadsheet cell, and pasting into a text document, LibO will offer:

Spreadsheet -- Paste an OLE object containing a spreadsheet document, and displaying the copied cell (or the range)
Graphic, metafile -- (try yourself)
Bitmap --
...
Unformatted text
...

What I already recommended was Ctrl+Shift+V (then) U to get what I supposed you wanted.

This should be the same on any OS - as far as supported by it.

(BTW, once more: The "additional line feed" actually is a paragraph break.)

edit flag offensive delete link more

Comments

Ctl+Shift+v produces "SYN" as char outside Calc, using u has no impact . (W10, Np++/show all char)

tmpacc gravatar imagetmpacc ( 2020-11-27 14:17:29 +0200 )edit

This is getting annoying.
You didn't mention the target software in your question, and I assumemd LibreOffice therefore (with an active Writer document).
How shoudl LibO control in what way Notepad++ evaluates te clipboard, what flavor it would prefer, what choice it might probably offer to the user, and in what way it migh shape the chosen content then,
LibreOffice only can pass contents to the clipoard regaring general conventions doing the Copy step.
If Notepad++ fails to offer a choice concerning the flavor, that's exclusively in its own responsipility.
I also use NP++ for some purposes, but never missed a feature as you seemingly expect.
The command for pasting in a special way (I don't know a shortcut for it) in NP++ offers a HTML version e.g. Having copied a Calc SheetCellRange you can create a HTML-table this way.
How a different software pastes clipboard ...(more)

Lupp gravatar imageLupp ( 2020-11-27 14:47:31 +0200 )edit

I'm sorry, but the target software is any, they all get that additional CRLF. I only used NP++ to get the chars displayed causing it.

"How shoudl LibO control in what way Notepad++ evaluates te clipboard"

Therefore I need the raw cell data as inserted by user (as if select text/copy) in order to process data as expected by given input(clean in advance, not decorated/to be cleaned afterwards requiring special/will never be supported method).

If not possible, the deployability of Calc for any raw data is limited by default bloated decorations on copy

tmpacc gravatar imagetmpacc ( 2020-11-27 15:13:43 +0200 )edit

Calc is spreadsheet software. It copies a cell to the clipboard in 18 flavors, as assumed to be useful for lots of purposes. To speak of "bloated decorations" is nonsense.
In what way do you want to make use of an additional flavor in the sense of what you call "raw data"?
Working with the software interactively, an additional BackDel needed shouldn't be a problem.
If you want to use the copied clipboard content by an automated ("macro") process, you should tell so.
If you think an additional flavor should be implemented, post a feature request to bugs.documentfoundation.org (as "enhance,ent").
If you want help with user code shaping the clipboard in your sense, tell it...
Grumpy comments won't lead anywhere.

Lupp gravatar imageLupp ( 2020-11-27 17:38:37 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-11-27 12:41:35 +0200

Seen: 56 times

Last updated: Nov 27 '20