I have an org document with two different-sized tables table1
and table2
.
#+TBLNAME: table1
| | | | | | | |
|---+---+---+---+---+---+---|
| | | x | x | x | x | x |
| | | x | x | x | x | x |
| | | x | x | x | x | x |
| | | | | | | |
| | | | | | | |
| | | | | | | |
#+TBLFM: @2$3..@4$7=x
#+TBLNAME: table2
| | | | | | | | | | |
|---+---+---+---+---+---+---+---+---+---|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | y | y | y | y | y | |
| | | | | y | y | y | y | y | |
| | | | | y | y | y | y | y | |
| | | | | | | | | | |
| | | | | | | | | | |
#+TBLFM: @6$5..@8$9=y
The region in table1
marked with x
's and the region in table2
marked with y
's are both arrays with three rows and four columns. I want to import the information in the indicated region of table2
into the indicated region of table1
.
Reading through the org documentation it appears that something like
#+TBLFM: @2$3..@4$7='(identity remote(table2, <STUFF>))
might work, but I can't figure out what <STUFF>
should be. Any ideas?
<STUFF>
should be the range, i.e.@6$5..@8$9
, but I'm afraid that importing rectangle won't work. At least I remember having problems specifying something more complex than a single value for all cell. But suppose you were to use Calc (rather than Lisp), the way I'd approach this is by tryingremote(table2, @6$5..@8$9)_(@#, $#)
i.e. Calc way of indexing a matrix. – wvxvw Sep 22 '15 at 23:48