The Computer Oracle

How to remove a plain text protecting single quote from all the selected cells in LibreOffice Calc?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Darkness Approaches Looping

--

Chapters
00:00 How To Remove A Plain Text Protecting Single Quote From All The Selected Cells In Libreoffice Calc?
01:24 Accepted Answer Score 64
01:43 Answer 2 Score 38
01:53 Answer 3 Score 0
02:06 Answer 4 Score 0
03:01 Thank you

--

Full question
https://superuser.com/questions/394092/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#libreofficecalc #cells

#avk47



ACCEPTED ANSWER

Score 64


You can remove the leading single quote (which actually isn't part of the string in the cell) using a regex-based search and replace:

  • Search for all characters between the start and end of the string ^.*$
  • replace with match &



ANSWER 2

Score 38


From the "Data" menu, choose "Text to columns".




ANSWER 3

Score 0


An attempt for regex replacing of ^.\*$ with & crashed LibreOffice 5. Replacing of .\* with & worked fine.




ANSWER 4

Score 0


This problem with the single quote mark still exists in LibreCalc. I tested both solutions and they work.

Text to Columns is probably the easiest to remember:

Data> Text to Columns> Make sure the settings do not actually split the data, then click OK. ...Done.

Search and Replace might be good if you need to get rid of the leading single quote indicator in the entire sheet:

Edit> Find and Replace> Make sure "regular expressions" is selected then search for.* and replace with & ...Done.

You do not need the ^ and $ characters to indicate the start and end of the string. The dot which means "any character" and the asterisk which means "zero or more times" does the trick.

But be careful; Removing the ' text flag opens up your data to auto-reinterpretation. In my experience, (at least with Excel) this leads to data corruption as it is often not correctly predicted which data should be reformatted and how.