Page 1 of 1
[Solved] Formatting numbers in tables
Posted: Wed Nov 21, 2012 1:58 am
by BRG1942
Sometimes I have a table in a document and I enter a number like 115.33173058 into it and Writer converts it to a number rounded to two decimal places. It does not do this always, but seemingly unpredictably. I know that if I were in Calc, I could simply do Format>Cells>Number, but this option does not exist in Writer. (On one occasion, it even reformatted something as a date!) I can seemingly fix this by putting some non-numeric character into the field, but that option does not exist if the number is all I want to display in that table cell (unless I insert something that is not a printable character in the font I'm using!).
I've noticed this in the past, but today I ran into a particularly vexing case of this. What can I do?
Re: Formatting numbers in tables
Posted: Wed Nov 21, 2012 2:53 am
by thomasjk
Go to Tools-->Options--->Openoffice Writer-->Table and uncheck "Number Recognition".
Re: [Solved] Formatting numbers in tables
Posted: Sat Nov 24, 2012 3:33 pm
by BRG1942
Thank you.
Re: Formatting numbers in tables
Posted: Sat Nov 24, 2012 4:21 pm
by nomnex
thomasjk wrote:Go to Tools-->Options--->Openoffice Writer-->Table and uncheck "Number Recognition".
I had a similar problem, and I may disagree with your comment. From the help file:
Number recognition
Specifies that numbers in a text table are recognized and formatted as numbers.
If Number recognition is not marked, numbers are saved in text format and are automatically left-aligned.
Number format recognition
If Number format recognition is not marked, only input in the format that has been set at the cell is accepted. Any other input resets the format to Text.
It seems to me that the option to disable is "Number format recognition". If I disable Number recognition, as per your comment, I lose the ability to format empty cells with a number format. If I disable Number format recognition, I keep the ability to format empty cells with a Number format, however the numbers I enter in cells without formatting are saved in text format.
Let me know.
Re: [Solved] Formatting numbers in tables
Posted: Sat Nov 24, 2012 5:29 pm
by acknak
You can apply a number format to any table cell: right-click on the cell and choose "Number Format" from the pop-up menu. You could also use the main menu: Table > Number Format.
That option is always available, regardless of any settings, but only inside a table. If you need a formatted number outside a table, you have to use a "field".
When it comes to working with formatted values in a table, Writer behaves in ways that I find entirely baffling. It seems to "lose" or change the number format on it's own, even with all the automatic options turned off. Turning on any of the automatic options only makes it more unpredictable, in my experience. If anyone understands how this is meant to work, I'd sure like to know.
Anyway, that aside, the simplest and most useful case works as expected (I think): you can enter values and apply a number format to give all the values the same format, and then later change the format as needed; the originally entered value is still there.
Re: [Solved] Formatting numbers in tables
Posted: Sun Nov 25, 2012 1:39 am
by nomnex
acknak wrote:When it comes to working with formatted values in a table, Writer behaves in ways that I find entirely baffling. It seems to "lose" or change the number format on it's own, even with all the automatic options turned off. Turning on any of the automatic options only makes it more unpredictable, in my experience. If anyone understands how this is meant to work, I'd sure like to know.
I have a very limited experience using Writer tables. After reading help file, and some trials.
[X] Number Recognition
[--] Number Format Recognition
[X] Alignment
Using this pattern, any number is treated as text (left align).
When "Number Format Recognition" is un-checked, "Number Recognition" will only be applied on cells using a "Format number" --> I can apply a Format number on empty cells in advance (That's convenient when I design a template).
[--] Number Recognition
[--] Number Format Recognition
[--] Alignment
Using this pattern, any number is treated as text (left align).
A Format number cannot be applied on empty cells (well, it can, but the Format number will be lost as soon as one inputs a value (treated as text)). Using this pattern, one can't format empty cells with a Format number in advance.
That's why I was suggesting the first setting instead of the second. Now, if my understanding of these settings is inaccurate or incomplete, I surely welcome some feedback.