emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [bug] spreadsheet does not replace some fields


From: Michael Brand
Subject: Re: [O] [bug] spreadsheet does not replace some fields
Date: Fri, 24 Aug 2012 19:49:34 +0200

Hi all

On Wed, Jun 20, 2012 at 10:53 PM, Michael Brand
<address@hidden> wrote:
> On Wed, Jun 20, 2012 at 3:47 PM, Juan Pechiar <address@hidden> wrote:
>> From the manual (section 3.5.6 Column Formulas):
>>
>>  If the table contains horizontal separator hlines, everything before
>>  the first such line is considered part of the table header and will
>>  not be modified by column formulas.
>
> Yes, of course, I should know! I read this some years ago but didn't
> realize then what effect it will have for me one day: All rows in my
> current example except the last one are just considered as the table
> header and everything becomes clear. How could I not conclude myself.
> Thank you for helping out.
>
> With this in mind it should be
>
> | item  | absolute | percent |
> |-------+----------+---------|
> | a     |       17 |      34 |
> | b     |       21 |      42 |
> | c     |       12 |      24 |
> |-------+----------+---------|
> | total |       50 |     100 |
> #+TBLFM: @>$2=vsum(@<<$2..@>>$2)::$3=100 * $2 / @>$2
>
> or
>
> |-------+----------+---------|
> | item  | absolute | percent |
> |-------+----------+---------|
> | a     |       17 |      34 |
> | b     |       21 |      42 |
> | c     |       12 |      24 |
> |-------+----------+---------|
> | total |       50 |     100 |
> |-------+----------+---------|
> #+TBLFM: @>$2=vsum(@<<$2..@>>$2)::$3=100 * $2 / @>$2
>
> and it is not possible to take the shortcut of
>
> | a     | 17 |     |
> | b     | 21 |     |
> | c     | 12 |     |
> |-------+----+-----|
> | total | 50 | 100 |
> #+TBLFM: @>$2=vsum(@<$2..@>>$2)::$3=100 * $2 / @>$2
>
> or
>
> |-------+----+-----|
> | a     | 17 |     |
> | b     | 21 |     |
> | c     | 12 |     |
> |-------+----+-----|
> | total | 50 | 100 |
> |-------+----+-----|
> #+TBLFM: @>$2=vsum(@<$2..@>>$2)::$3=100 * $2 / @>$2
>
> to group rows with hline

To make this clearer in the manual I suggest the attached small patch.

Michael

Attachment: 0001-org.texi-Mention-when-a-table-header-is-mandatory.patch.txt
Description: Text document


reply via email to

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