Preserve rows when copy and pasting into another application

Discuss the spreadsheet application
Post Reply
IndianRider
Posts: 3
Joined: Fri Jun 08, 2018 4:12 pm

Preserve rows when copy and pasting into another application

Post by IndianRider »

I was using Excel 2007 but, end of life and other bothersome items motivated me to switch to OpenOffice Calc.

For my work, I paste a link into a cell "Col A", hit enter then continue doing so in the same column.
Sometimes, I am able to use MacroRecorder that grabs a link from whatever I am given to process, it then pastes result into that rows cell and keypresses enter which prepares Calc for next row cell entry. Just like I would do manually.
When done, I remove dupes, sort then copy the links out of that column, 106 -111 at a time and paste them into separate notepad instances.

I have run into serious issues/shortcomings with Calc vs Excel in where Calc requires a whole lot more steps to perform this seemingly simple task.

1- There is no count provided by Calc as to how many I selected like in Excel.
2- When I paste into notepad, the rows (line breaks/newlines) are not preserved like with Excel.

Calc requires me to "do the math" in a column of a couple thousand rows to select 106 to 111 at a time where as Excel just displayed how many I selected. [Easy button].
Calc also requires me to paste the results into my favorite editor then search and replace spaces with returns before I paste those results into notepad. (Boss requires simple .txt files)
( Having multiple instances of notepad open is "better" for me than having multi instances of my fav editor open. )

1 - Please tell me that in Calc there is a simple setting that will provide the selected count to be displayed.
2- Also please tell me how to preserve rows when pasting into notepad.

I just cannot use Calc if I must go through so many more steps vs Excel for 14 hours a day! There must be a Calc solution so I don't have to rely on purchasing Excel.

Thanks for your assistance..
Windows 10 OpenOffice 4.1.5
If the shoe fits, find another one...
FJCC
Moderator
Posts: 9274
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Preserve rows when copy and pasting into another applica

Post by FJCC »

At the bottom right of the the Calc window there is a slider bar for setting the zoom. Just to the left of that is an are that may be blank or it may display some quantity, like SUM, related to the region of cells that is selected. Right click on that region and select CountA. That will tell you how many of the selected cells contain text. If there are no blanks, that is the same as the number of rows selected in a single column.

If I paste from Calc into Notepad, the rows are preserved. I don't know how to prevent that. I hope someone else has a suggestion.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
IndianRider
Posts: 3
Joined: Fri Jun 08, 2018 4:12 pm

Re: Preserve rows when copy and pasting into another applica

Post by IndianRider »

:super:
FJCC wrote:At the bottom right of the the Calc window there is a slider bar for setting the zoom. Just to the left of that is an are that may be blank or it may display some quantity, like SUM, related to the region of cells that is selected. Right click on that region and select CountA. That will tell you how many of the selected cells contain text. If there are no blanks, that is the same as the number of rows selected in a single column.
Perfect! Thank you so very much... Now if I can preserve the line breaks (biggest problem), I will be able to use Calc instead of Excel from this day forward.

Kudos 2U again...
Windows 10 OpenOffice 4.1.5
If the shoe fits, find another one...
IndianRider
Posts: 3
Joined: Fri Jun 08, 2018 4:12 pm

Re: Preserve rows when copy and pasting into another applica

Post by IndianRider »

Well, I discovered something interesting but, not a solution.
For some reason, pasting into notepad and preserving breaks started working. I changed nothing.
But, when I paste into some other app like Thunderbird/Write (new email), breaks are not preserved.
This is odd behavior since pasting from Excel works/preserves breaks/newlines in all software I use. OpenOffice does not.

I have replicated this on three computers now so, I know it is not some oddball setting resident to a specific computer or software config.

Since I do use other software besides notepad, it would be nice to find out how to preserve newlines when pasting.

Thanks again, this forum is a great resource..
Windows 10 OpenOffice 4.1.5
If the shoe fits, find another one...
User avatar
MrProgrammer
Moderator
Posts: 4905
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Preserve rows when copy and pasting into another applica

Post by MrProgrammer »

IndianRider wrote:Excel works/preserves breaks/newlines in all software I use. OpenOffice does not.
I do not have Windoze (thankfully) but I will guess that this is a Windows-only problem due to the way Windoze applications behave (or misbehave). Most operating systems use U+000A (Line Feed) as the line terminator. OpenOffice runs on many platforms (Linux, Mac, Windows, etc.), and a line break in a cell is represented by Line Feed. When I, using Mac OS X, create a cell with multi-line text and paste it into TextEdit, or Mail, or my web browser (Safari), the line breaks transfer correctly. I can guess at why it does not work on Windoze.

Windoze and applications written for Windoze use U+000D U+000A (Carriage Return + Line Feed or CR/LF) as the line delimiter. Multi-line cells in Excel will (probably — I can't verify that) use CR/LF as the line terminator, and when the data is copied to other Windows applications, the applications receive the CR/LF line terminators that they expect.

Copying a multi-line cell from OpenOffice, a Windoze application will see Line Feed in the middle of the data, without the expected Carriage Return. They will (probably — I can't verify that) display the unprintable Line Feed as a space. Depending on the application, they may convert the Line Feed to a space, or they may preserve it. From memory (ten years ago), WordPad will recognize Line Feed as a line terminator and display the data on separate lines. I don't know if WordPad converts Line Feed to CR/LF or preserves it. I seem to recall a story from several months ago that NotePad would be changed to recognize Line Feed as a line terminator and display the data on separate lines.

If you copy your multi-line cell with the formula =SUBSTITUTE(cell;CHAR(10);CHAR(13)&CHAR(10)), that will convert Line Feed to CR/LF. Perhaps you can Copy/Paste the result of that formula to a Windows application and it will work as you expect.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Preserve rows when copy and pasting into another applica

Post by Lupp »

Since I also use Thunderbird [52.8.0 (32-Bit) from PortablApps package] and have at hand AOO V4.1.5 (also portable version) I made a short test under my fully updated Win 10 with 4 cells from a Calc sheet.
Result:

A1
A2 line1
A2 line2
A2 line3
A3 line1
A3 line2
A4

in Thunderbird (body of a new mail) as well as here. Of course, there isn't any difference between the internal breaks contained in a cell and the breaks between cells.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply