2

Sorry if this is trivial. What are the exact step to export the following table:

1) to a buffer 2) to the file specified in properties

For now if I position the cursor inside the M-x org-table-export I get a prompt for a file, not a buffer.

enter image description here

* FRUIT

:PROPERTIES:
:TABLE_EXPORT_FILE: ~/Desktop/tbl
:TABLE_EXPORT_FORMAT: orgtbl-to-csv
:END:

| Name      | Color |
|------------+-------|
| Blueberry  | Blue  |
| Blackberry | Black |
  • Not quite sure what exactly you are asking, but 1) I think `org-table-export` exports to a file only, 2) if there is no `TABLE_EXPORT_FILE` property, it will prompt for a file name, 3) in the above,there is *NO* such property, because there is an empty line between the headline and the properties drawer, so it is not recognized as a properties drawer. Running `M-x org-lint` will flag such errors. If there is still a question, you might want to edit your question and clarify exactly what you are asking. – NickD Dec 22 '19 at 04:59
  • Another way to phrase my question, is how to make use of the properties? –  Dec 22 '19 at 06:01
  • 2
    As I mentioned, you have to fix the syntax error and delete the empty line between the headline (`* FRUIT`) and the property drawer (`:PROPERTIES: ...`). As it stands now, the properties are not recognized because of that syntax error. – NickD Dec 22 '19 at 12:55

2 Answers2

5

Based on @NickD's,

* FRUIT
:PROPERTIES:
:TABLE_EXPORT_FILE: ~/Desktop/tbl
:TABLE_EXPORT_FORMAT: orgtbl-to-csv
:END:

| Desc.      | Color |
|------------+-------|
| Blueberry  | Blue  |
| Blackberry | Black |

Position the cursor inside the table and do M-x org-table-export. That will gen the following table in the stated path:

Desc.,Color
Blueberry,Blue
Blackberry,Black
0

In order to let :TABLE_EXPORT_FILE: work

:PROPERTIES:
:TABLE_EXPORT_FILE: ~/Desktop/tbl
:TABLE_EXPORT_FORMAT: orgtbl-to-csv
:END:

Can be put at the top of the org file

Frank Wu
  • 51
  • 2