[Solved] Need single quote to stay in cell

Discuss the spreadsheet application
Post Reply
calcykeef
Posts: 2
Joined: Fri Mar 15, 2019 12:50 pm

[Solved] Need single quote to stay in cell

Post by calcykeef »

im using a program called drools which reads xls files
i need to put this in a cell of the spreadsheet 'gold'
but when i try it always removes the first quote
i tried double quotes but they cause errors with the drools parser
any help appreciated
Last edited by Hagar Delest on Fri Mar 15, 2019 10:36 pm, edited 1 time in total.
Reason: tagged solved
OpenOffice 4.1.6 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: need single quote to stay in cell

Post by Villeroy »

Same as in Excel (old versions of it at least). The leading apostrophe marks literal text input. It allows you to enter the literal text =SUM(A1:A9) or 0123. The first won't be interpreted as formula, the second won't be interpreted as number. The leading apostrophe is not part of the text.

Two solutions:
1) Format the cells in question as text. Cells that have been prepared like this will take any new input literally.
2) Type 2 leading apostrophes. Only the second one will be part of the text.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: need single quote to stay in cell

Post by Lupp »

The single apostrophe is also used in Calc to suppress the "recognition" of numeric entries. I would suppose you stumbled upon a malfunction of the recognition process.
Set the 'Numbers' format code for the cells you need the leading Apostrophe in to

Code: Select all

@
. This will make Calc ignore the ambivalence of that character.

(BTW: In LibreOffice the issue is fixed.)
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
calcykeef
Posts: 2
Joined: Fri Mar 15, 2019 12:50 pm

Re: need single quote to stay in cell

Post by calcykeef »

thanks both of you it works now
OpenOffice 4.1.6 on Windows 10
Post Reply