Central alligment of numbers with the dot in the middle

Discuss the spreadsheet application
Post Reply
rockfor
Posts: 3
Joined: Thu Dec 14, 2017 2:31 pm

Central alligment of numbers with the dot in the middle

Post by rockfor »

Hello there,
I have been using calc for some time now, and I was wondering how to make the nubers in a collumn alligned one under a nother but so that the separator (dot like in 12.67) is always in the middle. I know it is possible and there is a function for it. I have looked for it but I cant find it. Could you please tell me how to achieve such a alligment?
Open Office 4.1.4 on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: central alligment of nubers with the dot in the middle

Post by acknak »

Greetings and welcome to the community forum!

The only way I know to manage this is to have the same number of digits after (or before) the decimal separator. If this is not the case, I don't know how to align them.
AOO4/LO5 • Linux • Fedora 23
rockfor
Posts: 3
Joined: Thu Dec 14, 2017 2:31 pm

Re: central alligment of nubers with the dot in the middle

Post by rockfor »

Thank you.

Well, yest thats one way, but I have seen in an example where there are one, two sometimes three digits in a dumner after the separator (for me its , ) and it allignes perfectly all the comas in the middle, not relating to how many digits there is before or after the separator.
Open Office 4.1.4 on Windows 10
User avatar
Lupp
Volunteer
Posts: 3552
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: central alligment of nubers with the dot in the middle

Post by Lupp »

rockfor wrote:I know it is possible and there is a function for it.
Are you probably referring to the 'Decimal' tabulators available in 'Writer'? Tabulators are not supported at all in Calc.

I cannot imagine it, but if you urgently need to achieve the visual effect of a 'Decimal Tabulator' in Calc, you will need to accept the results to be texts instead of numbers. In addition you will need to either use very complicated formulae or to write and apply user code. At least unicode provides a character FIGURE SPACE (U+2007) which can replace trailing or leading zeros by whitespace with the same width as decimal digits have.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: central alligment of nubers with the dot in the middle

Post by keme »

See the attached file for two ways to emulate the decimal tab in a spreadsheet column.

The "insert spaces" approach depends on the use of a monospaced font. Lupp's suggestion for figure space may also fix it. Haven't got the time for additional testing ATM.

Split to two columns is perhaps better visually, but may be clumsy in some situations.

Either way, some work/redirection is required to have the display you request. You can't have the "pretty formatting" in data entry columns as far as I know.
Attachments
decimal tab.ods
(14.19 KiB) Downloaded 77 times
rockfor
Posts: 3
Joined: Thu Dec 14, 2017 2:31 pm

Re: central alligment of nubers with the dot in the middle

Post by rockfor »

Thank you for the file. I have seen it and yes, thats the effect I must achieve. Your anwser is precise but is it realy the only way to achieve the same effect? I managed to get a hand on the example I was refering to when I stardet the topic and there is an information that it can be done "automaticly" (as I translate from my language).
Attachments
alligment.JPG
alligment.JPG (23.61 KiB) Viewed 1761 times
Open Office 4.1.4 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34616
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: central alligment of nubers with the dot in the middle

Post by RoryOF »

keme wrote:The "insert spaces" approach depends on the use of a monospaced font. Lupp's suggestion for figure space may also fix it. Haven't got the time for additional testing ATM.
Any time I looked into this, I found that, in a left aligned column and across a wide range of (non-monospaced) fonts, each missing digit could be replaced by two spaces. If I was using a monospaced font, each digit was one space wide. Turn on /View /Non-printing characters to see exactly what is happening. This should be on for any form of such customised layout; remember, the on-screen display it gives does not print.

Your mileage may vary, of course.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply