* Could Babel honor spreadsheet formulas?
@ 2020-07-18 19:15 Uwe Brauer
2020-09-04 14:24 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Brauer @ 2020-07-18 19:15 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-04 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-18 19:15 Could Babel honor spreadsheet formulas? Uwe Brauer
2020-09-04 14:24 ` Bastien
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).