CSV-backed data table idea

Just had an idea I had to get out of my head while looking at my old Notion exports: A plugin to render tables based on CSV data.

The general idea is simple, use normal Obsidian embedding syntax for a CSV file (![[mydata.csv]]) and in preview view, render the data in a HTML table. If at all possible, it would be good to be able to pass the CSV data through the Markdown parser as well, so cells can be formatted, contain internal links or even other embedded content!

This would be just the beginning, also. It would be great to extend that with an almost spreadsheet-like table editor to edit the CSV files directly in a more UX-friendly way. Perhaps even basic spreadsheet-like formulas and cell references, the results of which can be calculated on render.

21 Likes

I’m already hearing this as one of the pain points for potential Notion to Obsidian converts. I’m glad this has been posted. In addition to more advance spreadsheet capability, I could see a table plugin to satisfy the Notion crowd (call it an Obsidian database for them) that allows you to sort columns or manually rearrange in real-time. Could be a mode where it just collects all #Tags and [[Links Within]] or come up with a way to separate content links & tags from organizating links & tags for each page. Maybe designate a Section for the plugin to recognize as metadata similar to the to metadata area in Notion. Or the user chooses a rule that all organizing tags have to be above the first heading. There are endless sollutions. But hopefully a graceful one is found to reliably work with the potentially ‘messy’ nature of markdown.

Some Project Plans

Obsidian Notes Tags Categories
[[Big Project]] #process #delegate [[Rent Job]] [[Client 4]]
[[Little Project]] #done #document [[Client 3]] [[Outsource 2]]
[[Just Right Project]] #assign #review #explore [[Invoice 2]]
[[Endless Project]] #done [[Client 1]] [[Location 3]]
9 Likes

Yes! Good idea @death.au . +1 :smiley:

I was just thinking of writing a script to convert CSV files to markdown tables, but a plugin would be even better.

And @goodsignal’s idea with the metadata would be awesome!


I would love to see this added as a plug-in but I’m still toying with the idea of building something. Maybe the CSV file could be rendered in an iframe. I’d rather not rely on another service, but something like this might work:

4 Likes

Really hope this come reality. For me it’s the most important missing feature.

2 Likes

+1 on this. I really hate the idea of creating markdown tables for any csv i’d like to import when the CSV is already super accessible

3 Likes

Excellent idea. It reminds me of Texthaven, a Markdown editor which can also create and edit CSV files. See the details here: Texthaven CSV features

5 Likes

Just want to report that now there is a decent Table Manager as a Third-Party Plugin called

I often use these two tools for md table conversion

However, it would be so much more powerful if @death.au suggestion was implemented. I keep resisting converting to md tables because it feels like such a death sentence for dynamic data. The maintenance cost gets so high for anything but final presentations.

It would be nice to maintain spreadsheet data using real spreadsheet apps and see the results automatically rendered in Obsidian as a md table based on an embedded CSV.

Even better with a few basic modification options for any embed, like: Center-align text; Bold first row; Bold last row; Format numbers, …

6 Likes

I tried talking the idea up on Discord but it didn’t get play. I felt it was a compelling argument so I’m copying it here.

I’m curious Licat, is embedding .CSV to render as a MD table something you’d consider building in?

  • It seems worthy of being a core feature when you consider how accessible, universal, and user friendly they (CSVs) are.
  • CSV is a powerful file format. Thousands of refined tools already exist to manipulate them.
  • The core principles of CSV are nicely aligned with markdown.
  • And when you consider future proofing, CSV integration is more resilient than PDF integration.
  • Unlike PDF, it can at be integrated directly as a table and exported as part of the .md document, should we ever need.
  • Considering Obsidian’s existing featureset, it seems like a natural marriage.

One additional plug for being a core feature is that it seems like it could be a powerful tool for other 3rd Party Plug-ins to have API access to. Seems like it could be an enabler for more advanced tools while maintaining relative simplicity in implementation and maintenance from the Obsidian side.

5 Likes