emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] extract a region from a table and export it


From: Rasmus
Subject: Re: [O] extract a region from a table and export it
Date: Tue, 14 Jun 2016 18:12:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Uwe Brauer <address@hidden> writes:

>>>> "John" == John Kitchin <address@hidden> writes:
>
>
>
>    > or, rows 0, 1 and 4.
>
>    > #+BEGIN_SRC emacs-lisp :var d=data
>    > (loop for i in '(0 1 4) collect (elt d i))
>    > #+END_SRC
>
> Ok the second code works now, and is almost what I want, but I need it
> mostly for columns, it is not obvious for me that corresponds in the
> syntax above to columns.

See (info "(org) var") in particular the section on "Indexable variable
values".


        Additionally, an empty index, or the single character ‘*’, are both
     interpreted to mean the entire range and as such are equivalent to
     ‘0:-1’, as shown in the following example in which the entire first
     column is referenced.

          #+NAME: example-table
          | 1 | a |
          | 2 | b |
          | 3 | c |
          | 4 | d |

          #+BEGIN_SRC emacs-lisp :var data=example-table[,0]
            data
          #+END_SRC

          #+RESULTS:
          | 1 | 2 | 3 | 4 |


-- 
If you can mix business and politics wonderful things can happen!




reply via email to

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