* Remote References to Tables in Included Files.
@ 2013-12-12 14:32 Ian Barton
2014-01-04 14:19 ` Bastien
2014-01-04 15:41 ` Michael Brand
0 siblings, 2 replies; 3+ messages in thread
From: Ian Barton @ 2013-12-12 14:32 UTC (permalink / raw)
To: emacs-orgmode
I am trying to combine summary data from org tables. Data for each year
is stored in a separate org file, with a table for each month. I have
created a file called combined.org, which INCLUDES the org files for
each of the 12 months.
Can't find remote table "october2012".
examplea.org:
* November.
#+tblname: november2013
|------------------+----------+-----------|
| Date | Distance | Heading 3 |
|------------------+----------+-----------|
| [2012-11-03 Sat] | 42.70 | |
| [2012-11-04 Sun] | 31.97 | |
| Total | 74.67 | |
|------------------+----------+-----------|
exampleb.org:
* November.
#+tblname: november2013
|------------------+----------+-----------|
| Date | Distance | Heading 3 |
|------------------+----------+-----------|
| [2012-11-03 Sat] | 42.70 | |
| [2012-11-04 Sun] | 31.97 | |
| Total | 74.67 | |
|------------------+----------+-----------|
combined.org:
#+INCLUDE: "./examplea.org"
#+INCLUDE: "./exampleb.org"
* Monthly Totals.
#+tblname: monthly_total_mileage
|-------+----------|
| Month | Distance |
|-------+----------|
| Oct | |
| Nov | |
|-------+----------|
| Total | |
| | |
|-------+----------|
#+TBLFM: @2$2 = remote(october2012,@2$2)::@3$2 = remote(november2013,@3$2)::
Ian.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Remote References to Tables in Included Files.
2013-12-12 14:32 Remote References to Tables in Included Files Ian Barton
@ 2014-01-04 14:19 ` Bastien
2014-01-04 15:41 ` Michael Brand
1 sibling, 0 replies; 3+ messages in thread
From: Bastien @ 2014-01-04 14:19 UTC (permalink / raw)
To: Ian Barton; +Cc: ian, emacs-orgmode
Hi Ian,
quoting the manual:
Remote references
.................
You may also reference constants, fields and ranges from a different
table, either in the current file or even in a different file. The
syntax is
remote(NAME-OR-ID,REF)
where NAME can be the name of a table in the current file as set by
a `#+NAME: Name' line before the table. It can also be the ID of an
entry, even in a different file, and the reference then refers to
the first table in that entry. REF is an absolute field or range
reference as described above for example `@3$3' or `$somename',
valid in the referenced table.
For remote references in other files, you need to use entry IDs,
not tables names. At least this is how I understand it.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Remote References to Tables in Included Files.
2013-12-12 14:32 Remote References to Tables in Included Files Ian Barton
2014-01-04 14:19 ` Bastien
@ 2014-01-04 15:41 ` Michael Brand
1 sibling, 0 replies; 3+ messages in thread
From: Michael Brand @ 2014-01-04 15:41 UTC (permalink / raw)
To: ian; +Cc: Org Mode
Hi Ian
On Thu, Dec 12, 2013 at 3:32 PM, Ian Barton <lists@wilkesley.net> wrote:
> I am trying to combine summary data from org tables.
> [...]
> #+TBLFM: @2$2 = remote(october2012,@2$2)::@3$2 = remote(november2013,@3$2)::
> [...]
Just a few days ago I have implemented remote reference indirection
for name or ID which you might find useful for your use case. Please
see here:
http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00118.html
Michael
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-04 15:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12 14:32 Remote References to Tables in Included Files Ian Barton
2014-01-04 14:19 ` Bastien
2014-01-04 15:41 ` Michael Brand
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.