1

I want to have tables that I can easily export to files. In this regard I want to associate a file path and a format to tables. This page in the docs is most relevant: https://orgmode.org/manual/Built_002din-table-editor.html

I tried this to set the file path:

#+TABLE_EXPORT_FILE: 'data/observations.csv'
| day              | observation |
|------------------+-------------|
| <2019-11-14 Thu> | cold        |
| <2019-11-14 Thu> | warm        |

And then running org-table-export but I still get the prompt asking for a file.

I am fine with a per-file setting of the file format, i.e.:

# Local Variables:
# mode: org
# org-table-export-default-format: orgtbl-to-csv
# End:

But it would be nice to set that as well on a per table basis.

I also would like a way to run this for all tables at once (ideally in combination with org-babel-tangle). I'll ask another Q for that if you want the points :)

1

The doc you linked says:

You may also use properties TABLE_EXPORT_FILE and TABLE_EXPORT_FORMAT to specify the file name and the format for table export in a subtree.

They are properties and not keywords. So you set them in the properties drawer of the subtree.

Example:

* Section with table
:PROPERTIES:
:TABLE_EXPORT_FILE: data/observations.csv
:TABLE_EXPORT_FORMAT: orgtbl-to-csv
:END:

| day              | observation |
|------------------+-------------|
| <2019-11-14 Thu> | cold        |
| <2019-11-14 Thu> | warm        |
  • This works. Seems counterintuitive though imo. It doesn't export the header row though... – salotz Nov 15 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.