Bug 87050 - Editing characters in a cell formatted as a telephone number
Summary: Editing characters in a cell formatted as a telephone number
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86 (IA32) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-06 14:54 UTC by Brian
Modified: 2020-11-07 06:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
List of numbers with periods and hyphens unreplaceable in batch (55.16 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-12-06 14:54 UTC, Brian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian 2014-12-06 14:54:21 UTC
Created attachment 110509 [details]
List of numbers with periods and hyphens unreplaceable in batch

After importing an XL spreadsheet, I found the author had used periods to note telephone numbers (eg. 999.999.9999).  As I needed unbroken numbers for my purposes, I attempted to remove the periods using Find and Replace and found I could not. I attempted to turn the numbers into text using the Format->Cell->Text menu items. I tried removing Direct Formatting.  No joy.  It appears that there is no way to bulk edit these periods or (I later discovered) hyphens from a cell once it is formatted that way.
Comment 1 Jean-Baptiste Faure 2014-12-06 17:23:36 UTC
Which version of LibreOffice do you use? With version 4.4.0.0.beta2+ under Ubuntu, replacing the dot and the hyphen by nothing produces numbers (right aligned in the cells).
Same result with version 4.3.6.0.0+

Note: take care to use search&replace dialog without "Regular Expressions" checkbox checked, because the dot has a special meaning when used as regular expression.

Set status to NEEDINFO. Please set it back to UNCONFIRMED once you have provided requested informations. Thank you for your understanding.

Best regards. JBF
Comment 2 Brian 2014-12-06 19:31:31 UTC
I am using Version: 4.3.4.1.  I tried modifying options to eliminate the possibility of the calc program interpreting the "find" parameters as a Regular Expression.  No change in result.  Thanks for the idea anyway, I would not have thought of that.
Comment 3 m_a_riosv 2014-12-06 22:28:56 UTC
I think there are several ways to do it, maybe the best and secure in advance is the C).

A 1) First replace dots with nothing. Results in numbers.

A 2 a) using regular expressions convert numbers in text:

Search: .*
Replace: '&

A 2 b) with Menu/Data/Text to column:
Select the numbers column
Menu/Data/Text to column
Mark column head and in Column type box select Text.
---------------------------------------------------

B) In one step using regular expressions:

Search: (.*)\.(.*)\.(.*)
Replace: '$1$2$3
---------------------------------------------------
C 1) Format cells with numbers as Text @
C 2) Doing a search and replace dots for nothing.


Format cells as text must be done before search and replace, to avoid the conversion in true numbers. Take in account that change the format never change the cell content.

I think it works so by design.
For me not a bug.

Please if you are not agree reopen it, but in this case I think it would a request for enhancement.
Comment 4 jameswall 2020-09-15 07:26:19 UTC Comment hidden (spam)
Comment 5 nickwin 2020-11-07 06:39:49 UTC Comment hidden (spam)