I have an org file with multiple tables
$ cat ~/foo.org
#+Title: hello world
* section 1
lorem ipsum
#+TBLNAME: first-table
| i | want | to |
| export | this | table |
#+TBLNAME: second-table
| this | table | is |
| not | as | important |
This file is updated regularly. I have a perl script that parses the csv
file obtained from issuing M-x org-table-export
on first-table
. I would like to be able to export first-table
to csv from the command line so I don't have to do this manually every time. Is this possible?
(org-babel-ref-resolve "first-table")
- this will give you the table as a list, and then callorgtbl-to-csv
on that list. See the documentation oforgtbl-to-csv
for additional arguments. You could then run Emacs in batch mode to execute your function either using--eval
or-f
options.