The purpose of this plugin is to be able to export table data from a pane in reading mode into a CSV file.
Background: The fabulous Dataview plugin for Obsidian allows to dynamically create tables from an SQL-like query over your notes' metadata.
I wanted to be able to further use this created data in external applications, like MS Power BI, to create visualizations of that data.
But the plugin can export any table into a CSV file, even those you "hard-coded" in Markdown (if that makes sense for you) or those that were created by some other plugin.
My plugin allows you to configure a few things in its settings:
-
The base filename of the CSV file
This is the first part of the filename of the CSV file you're about to save.
Default:
table-export
-
The separation character
Here you can select the character that separates the data fields in the CSV file. The dropdown box contains the usual suspects like comma, semicolon and tab. But there are some unusual choices as well.
Default:
,
-
Quote data
If you want the data cells in the CSV file to be enclosed in quotation marks you can choose to do so here. In the dropdown box you can choose between either double quotation marks (
"
), single quotation marks ('
) or not to quote data at all.Default: no quoting
-
Handling of CR/LF in data
In some rare cases you might have return (CR) or linefeed (LF) characters inside of data fields/cells. This will break the CSV file. With this setting you can select how you want to handle these characters. You can either simply strip them, replace them with a single space character or replace them with the fixed string
[CR]
so that you later can still see that there once was some kind of return character in your data.Default: Replace all CR & LF characters with one space
-
Copy to clipboard, too
Optionally you can copy the CSV string to the clipboard, too.
Default:
off
- Exports the table closest to your mouse cursor in edit mode (instead of always the first)
- Input for file name