emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Tbl: precision for cells
@ 2013-05-17 20:18 Manfred Lotz
  2013-05-18 15:07 ` Suvayu Ali
  0 siblings, 1 reply; 5+ messages in thread
From: Manfred Lotz @ 2013-05-17 20:18 UTC (permalink / raw)
  To: emacs-orgmode

I have a table like this

| Item                     |    F1  |       F2 |       F3 |
|--------------------------+--------+----------+----------|
| w                        | 579.12 | 110.0328 | 689.1528 |
| x                        |   28.8 |    5.472 |   34.272 |
| y                        |   13.2 |    2.508 |   15.708 |
| z                        |    24. |     4.56 |    28.56 |
|--------------------------+--------+----------+----------|
| Sum                      | 513.12 |  97.4928 | 610.6128 |

As the numeric fields are currency fields could I specify somehow for
the whole table that there are exactly 2 decimals after the dot?


So that I have this:
| Item                     |    F1  |       F2 |       F3 |
|--------------------------+--------+----------+----------|
| w                        | 579.12 |   110.03 |   689.15 |
| x                        |  28.80 |     5.47 |    34.27 |
| y                        |  13.20 |     2.51 |    15.71 |
| z                        |  24.00 |     4.56 |    28.56 |
|--------------------------+--------+----------+----------|
| Sum                      | 513.12 |    97.49 |   610.61 |


-- 
Thanks,
Manfred

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tbl: precision for cells
  2013-05-17 20:18 Tbl: precision for cells Manfred Lotz
@ 2013-05-18 15:07 ` Suvayu Ali
  2013-05-19  4:11   ` Manfred Lotz
  0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2013-05-18 15:07 UTC (permalink / raw)
  To: emacs-orgmode

On Fri, May 17, 2013 at 10:18:08PM +0200, Manfred Lotz wrote:

 [...chomp...chomp...chomp...]

> As the numeric fields are currency fields could I specify somehow for
> the whole table that there are exactly 2 decimals after the dot?

Have you looked at the Chapter on tables in the manual?

<http://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calc>

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tbl: precision for cells
  2013-05-18 15:07 ` Suvayu Ali
@ 2013-05-19  4:11   ` Manfred Lotz
  2013-05-19 14:05     ` Suvayu Ali
  0 siblings, 1 reply; 5+ messages in thread
From: Manfred Lotz @ 2013-05-19  4:11 UTC (permalink / raw)
  To: emacs-orgmode

On Sat, 18 May 2013 17:07:36 +0200
Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:

> On Fri, May 17, 2013 at 10:18:08PM +0200, Manfred Lotz wrote:
> 
>  [...chomp...chomp...chomp...]
> 
> > As the numeric fields are currency fields could I specify somehow
> > for the whole table that there are exactly 2 decimals after the dot?
> 
> Have you looked at the Chapter on tables in the manual?
> 
> <http://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calc>
> 
> Hope this helps,
> 

Yes, I had checked this out. However, didn't find anything on this page
helping me.

I know that I could add ;%.2f to each formula in the table. However, I
would like to specify %.2f only one time for the whole table. 

-- 
Manfred

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tbl: precision for cells
  2013-05-19  4:11   ` Manfred Lotz
@ 2013-05-19 14:05     ` Suvayu Ali
  2013-05-20 14:28       ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2013-05-19 14:05 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, May 19, 2013 at 06:11:03AM +0200, Manfred Lotz wrote:
> 
> I know that I could add ;%.2f to each formula in the table. However, I
> would like to specify %.2f only one time for the whole table. 

The format specifier is per formula.  I do not know of any way to have a
per table format specifier, sorry.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tbl: precision for cells
  2013-05-19 14:05     ` Suvayu Ali
@ 2013-05-20 14:28       ` Darlan Cavalcante Moreira
  0 siblings, 0 replies; 5+ messages in thread
From: Darlan Cavalcante Moreira @ 2013-05-20 14:28 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode


If everything fail you can always process the table with babel to create a
new table the way you like. You could add a function for that to the
library of babel to have it always available.

It is less convenient then a format specifier for the whole table as you
want, but it is a very powerful and flexible way.

--
Darlan

At Sun, 19 May 2013 16:05:33 +0200,
Suvayu Ali wrote:
> 
> On Sun, May 19, 2013 at 06:11:03AM +0200, Manfred Lotz wrote:
> > 
> > I know that I could add ;%.2f to each formula in the table. However, I
> > would like to specify %.2f only one time for the whole table. 
> 
> The format specifier is per formula.  I do not know of any way to have a
> per table format specifier, sorry.
> 
> Cheers,
> 
> -- 
> Suvayu
> 
> Open source is the future. It sets us free.
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-20 14:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 20:18 Tbl: precision for cells Manfred Lotz
2013-05-18 15:07 ` Suvayu Ali
2013-05-19  4:11   ` Manfred Lotz
2013-05-19 14:05     ` Suvayu Ali
2013-05-20 14:28       ` Darlan Cavalcante Moreira

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).