emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Named columns in org tables [9.7-pre (release_9.6.9-797-g4d0f89]


From: Bruno Barbier
Subject: Re: Named columns in org tables [9.7-pre (release_9.6.9-797-g4d0f89]
Date: Wed, 27 Sep 2023 14:10:37 +0200

Hi Paul,

Paul Stansell <paulstansell@gmail.com> writes:

> Hello,
>
> On this page https://orgmode.org/manual/Advanced-features.html
> it says
> - '!' :: The fields in this line define names for the columns, so that
>   you may refer to a column as '$Tot' instead of '$6'.
> ...
> |---+----+----+----|
> | ! | c1 | c2 | c3 |
> | # |  1 |  2 |    |
> | # |  3 |  4 |    |
> |---+----+----+----|
> #+TBLFM: $c3 = $c1 + $c2
>
> Is this a bug?

It seems to me it's a bug in the documentation.

Currently, column names are not allowed in the LHS (Left Hand Side) of
the formula ('org-table-get-stored-formulas' assumes it).  Although I'm
not sure why.

In other words, you'll need to use the real column number
for the column that holds the results. This should work:

   | ! | c1 | c2 | c3 |
   |---+----+----+----|
   | # |  1 |  4 |  3 |
   | # |  3 | 10 |  7 |
   #+TBLFM: $3 = $c1 + $c2



Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]