An Obsidian Plugin that allows to export tables from a pane in reading mode to CSV files.

Overview

Obsidian Plugin "Table to CSV Exporter"

This is my very first attempt in writing a plugin for Obsidian. I didn't even know TypeScript before (but JavaScript).

What does it do?

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.

Settings

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

  • A file number addition

    This gets added to the base filename (after a hyphen). After this, the extension .csv is added.
    This number gets incremented by one after each succesful export and resetted to 001 after reaching 999.
    Normally you won't need to interfere with this in the settings but you can change it if you want.
    But be careful! Don't mess with this. Don't change this to text or something different than numbers. And stay in the ### scheme (three ciphers max., leading zeroes).
    It may become neccessary to either change this number manually or to delete/rename/move files out of your vault folder.
    No worries, though: the plugin never overwrites any files and warns you if a file already exists.

    Default: 001

  • 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

Usage

The plugin adds a new command: "Export table to CSV file". This will only work when your currently active pane is in reading mode. When the command is executed a .csv file is written according to the settings in your vault's main folder. This CSV file contains the data of the first table in the reading mode of the note.

The plugin works on mobile, too. (Tested on iPadOS only, though.)

Current limitations

Of course, there's always room for improvement. As of version 0.1.4, there are the following limitations/restrictions:

  • The plugin currently exports only the first table that it finds in the reading mode of a note.
  • The plugin saves the CSV file directly into you vault's main folder. A feature to select another folder inside your vault will be added later.

Thanks

I'd like to thank several people here. Without them this plugin wouldn't have come to live.

  • Edmund Gröpl – for bringing up the problem at all and his encouragement over all the years.
  • Marcus Olsson – for starting the Obsidian Plugin Developer Docs project which I highly recommended, especially for beginners. He's on Twitter, too: @marcusolsson
  • Johannes Theiner – a very kind and helpful user over at the official Obsidian Discord server. I met him in the #plugin-dev channel and his answers to my questions were very helpful. He's also on Twitter: @joethei

Contact

Please leave feedback here in the GitHub discussions or file a new issue if you found a bug or have a feature request. You can reach me via Twitter, too:

Sponsoring

If this plugin adds value for you and you would like to help support continued development, please consider sponsoring this repository via GitHub Sponsors, PayPal or Buy me a coffee.

Made with ❤️ in Bonn, Germany.

You might also like...

An obsidian plugin for uploading local images embedded in markdown to remote store and export markdown for publishing to static site.

An obsidian plugin for uploading local images embedded in markdown to remote store and export markdown for publishing to static site.

Obsidian Publish This plugin cloud upload all local images embedded in markdown to specified remote image store (support imgur only, currently) and ex

Dec 13, 2022

A Zotero add-on that scans your Markdown reading notes, tags the associated Zotero items, and lets you open notes for the Zotero items in Obsidian.

A Zotero add-on that scans your Markdown reading notes, tags the associated Zotero items, and lets you open notes for the Zotero items in Obsidian.

Zotero Obsidian Citations Adds colored tags to Zotero items that have associated Markdown notes stored in an external folder. Open an associated Markd

Jan 4, 2023

A refined tool for exploring open-source projects on GitHub with a file tree, rich Markdown and image previews, multi-pane multi-tab layouts and first-class support for Ink syntax highlighting.

A refined tool for exploring open-source projects on GitHub with a file tree, rich Markdown and image previews, multi-pane multi-tab layouts and first-class support for Ink syntax highlighting.

Ink codebase browser, "Kin" 🔍 The Ink codebase browser is a tool to explore open-source code on GitHub, especially my side projects written in the In

Oct 30, 2022

Easily open daily notes and periodic notes in new pane; customize periodic notes background; quick append new line to daily notes.

Easily open daily notes and periodic notes in new pane; customize periodic notes background; quick append new line to daily notes.

Obsidian daily notes opener This plugin adds a command for opening daily notes in a new pane (so that a keyboard shortcut could be used!) and gives ex

Dec 26, 2022

Simple and minimal split pane component for Solid!

solid-split-pane Split pane component for Solid! Uses Split.Js under the hood. Takes all props that split.js takes, plus a gutterClass. (Q) Why not so

Oct 28, 2022

File Hider - This is a plugin for Obsidian that allows hiding specific files and folders from the file explorer

File Hider - This is a plugin for Obsidian that allows hiding specific files and folders from the file explorer

Dec 16, 2022

Export AWS SSM Parameter Store values in bulk to .env files

aws-parameter-bulk Utility to read parameters from AWS Systems Manager (SSM) Parameter Store in bulk and output them in environment-file or json forma

Oct 18, 2022

✨ A cli can automatically export files of the same type

✨ A cli can automatically export files of the same type

auto-export A cli can automatically export files Why When you want to export many files of the same type in one folder, you may cost a lot of time to

Aug 11, 2022

A little JavaScript plugin to generate PDF, XLS, CSV and DOC from JavaScript Object or DOM element only from the frontend!

💫 JavaScript Object to csv, xls, pdf, doc and DOM to html generator 💫 A little JavaScript plugin to generate PDF, XLS, CSV and DOC from JavaScript O

Jan 7, 2023
Comments
  • Allowing Overwriting

    Allowing Overwriting

    Hi, I've got two questions/feature requests for you to consider

    • Is it possible to add a toggle to allow overwriting an exported file?
    • Could the export use the Note Title as the exported filename?

    Cheers

    opened by mutton44 4
Releases(0.1.4)
Owner
Stefan Wolfrum
Stefan Wolfrum
A plugin for obsidian to focus and highlight on a specific heading in Reading mode.

Focus and Highlight A plugin for obsidian to focus on a specific paragraph in Reading mode. Features Focus on a specific heading and its children when

Bo-Yi Tsai 22 Dec 21, 2022
An Obsidian plugin to add (prepend or append) specified content to a note (existing or new) without opening another pane.

Obsidian Note Content Pusher An Obsidian plugin to add (prepend or append) specified content to a note (existing or new) without opening another pane.

Henry Gustafson 21 Nov 6, 2022
Obsidian-dataview-table-filter-menu - Dynamically created filter menu for dataview tables in obsidian

Dataview table Filter Menu for Obsidian Dynamically created filter menu for data

shiro 17 Sep 24, 2022
Firefox Extension for Smart Reading - Bionic Reading

Smart Reader - Bionic Reading Smart Reader or Bionic reading is a way to keep our focus on the web. The fact that the beginnings of words are bolded,

Poucous 27 Dec 17, 2022
Obsidian plugin that allows user to create a glossary of files, an index of files or both.

Obsidian Auto Glossary Auto Glossary is an Obsidian plugin to create a glossary, an index or a glossary with an index from the files you want. Feature

Ennio Italiano 29 Dec 30, 2022
A plugin for Obsidian (https://obsidian.md) that adds a button to its search view for copying the Obsidian search URL.

Copy Search URL This plugin adds a button to Obsidian's search view. Clicking it will copy the Obsidian URL for the current search to the clipboard. T

Carlo Zottmann 6 Dec 26, 2022
jQuery Split Pane plugin

split-pane jQuery Split Pane plugin The plugin should work in IE8 and above as well as in Chrome, Safari and Firefox. You can download split-pane.js a

Simon Hagström 162 Dec 13, 2022
MDN-Dark-Mode - Simple extension to add a dark mode with different themes to the MDN Web Docs website

MDN-Dark-Mode Information Chrome and Firefox extension that adds a dark mode wit

Santiago Galán Barlo 2 Mar 18, 2022
🌓 Add dark mode/night mode custom elements to your website.

dark-mode A custom element that allows you to easily put a Dark Mode ?? toggle. so you can initially adhere to your users' preferences according to pr

小弟调调™ 12 Oct 20, 2022
Obsidian plugin to export Graphviz graphs from vault's notes

What it is: an Obsidian plugin to generate hierarchical graphs, with the nodes are from your Obsidian vault How it does: convert the database from Bre

Ooker 22 Nov 14, 2022