emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Could  Babel  honor spreadsheet formulas?
Date: Sat, 18 Jul 2020 21:15:48 +0200	[thread overview]
Message-ID: <87wo30skgr.fsf@mat.ucm.es> (raw)


Hello 

The orgtbl-join package honors spreadsheet as the following example
shows

#+NAME: TA
| Name  | col1 | col2 |
|-------+------+------|
| User1 |    2 |    2 |

#+NAME: TB
| Name  | col3 |
|-------+------|
| User1 |    4 |

#+NAME: Result
#+BEGIN: join :mas-table "TA" :mas-column "Name" :ref-table "TB" :ref-column "Name"
| Name  | col1 | col2 | col3 |   |
|-------+------+------+------+---|
| User1 |    2 |    2 |    4 | 8 |
#+TBLFM: $5=vsum($2..$4);f1
#+END:


So whenever you actualize TA, the table Results will be upgraded.

Unfortunately this package only allow you to add columns not rows. 

In order to add rows the following code can be used 
#+begin_src elisp :var table1=TA  :var table2=TB  :colnames t
(append table1 table2  )
#+end_src

Restulting in 

#+RESULTS:
| User1 | 2 | 2 |
| User1 | 4 |   |
However when I modify this to 

#+Name: New
#+RESULTS:
| User1 | 2 | 2 | 4 |
| User1 | 4 |   | 4 |
#+TBLFM: $4=vsum($2..$3);f1

And upgrade one of the table, execute the babel code, the spreadsheet
formula is gone.

So could babel somehow respect the spreadsheet formula?

Regards

Uwe Brauer 



             reply	other threads:[~2020-07-18 19:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18 19:15 Uwe Brauer [this message]
2020-09-04 14:24 ` Could Babel honor spreadsheet formulas? Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo30skgr.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).