Brett on 20 Oct, 2021 04:21 PM
Marked can't open CSV files directly, but if you include one using
Marked's include syntax inside of a Markdown document, it will convert
it to a MultiMarkdown table (viewable by both MMD and GFM processors). I
haven't extensively tested this feature, but it works on most of the
CSV's I have laying around. Marked watches included files for changes,
so it will refresh the preview when the CSV file changes.
In an empty Markdown file, just add a line like:
If the CSV is in the same folder as the Markdown file with the include,
you don't need the path, just the filename.
Caveats: The CSV->Table processing isn't terribly efficient, so massive
CSVs will take a few seconds to load/refresh on change. Also, in testing
this to make sure I was giving you good info, I did manage to crash
Marked, so there's a bug in there somewhere that I haven't caught yet.
Only happened once, though. If you do experience a crash while doing
this, feel free to share a crash report :).
I tried your trick with a really small .csv file. It appeared in Marked2 fairly promptly & edits that I made to the .csv file were updated after a few seconds. A little slower than with normal Markdown, but much quicker than opening in Numbers! (BTW, I’m on a 2018 Mac mini, 3 GHz 6-Core Intel Core i5, 16 GB 2667 MHz DDR4)
I tried one of my bigger .csv files. It also opened in Marked2 fairly quickly and looked good. I tried updating the .csv file but the Marked2 rendering hasn’t updated after about 5 minutes. So this would stop it being useful to check if I needed an extra comma somewhere.
I found that I could use the slider or ↑/ ↓ arrow to move around, which would be useful to check that things are lined up in correct columns. But on a second test, I accidentally selected some of Marked2’s cell. This threw Marked2 into a BeachBall tail spin and I needed to Force Quit it. I’ve attached the report in case it’s any use to you.
Brett on 20 Oct, 2021 07:31 PM
Any chance you could share one of your huge CSV files so I can test with
it? I can give you a direct email if it's private but you're willing to
share. Development on this lesser-known feature isn't top priority, but
it would be nice to have something to battle test with when I get to
The files that I tested included people’s personal details but I fished out a similar file and reacted it ('Marked2bigCsvTriggersFreeze.csv’), which is attached along with its .md file.
This one is actually more horrible than the one I’d tested yesterday in that it still has a lot of the unwanted commas/columns that I’d removed with regex/manually. I don’t know if this would really confuse Marked2, as such, but it would mean that the file was bigger in that it would have more columns than my original test (but about the same number of rows, ~1600).
I just tested this retacted one too. It was worse. Marked2 crashed as soon as I dropped the .md file onto it in the Dock.
One other thought I had was that yesterday’s crash could have been in part because I was working with files that were in iCloud. Marked2 could have been trying to work nicely but screwed up because syncing was in progress. I’ve noticed that iCloud is *very* slow, at the moment. Today’s test, was with ‘Marked2bigCsvTriggersFreeze.csv’ and its .md file, in my local drive so this will not have been subject to any iCloud syncing complications, but the crash still happened.
Yesterday, I installed a free app from the Apple AppStore called ‘CSView’, yesterday. I’ve not tested it that rigorously yet, but it seems to do what I need: I can open a big .csv file and it’s displayed as a table/spreadsheet. Changes that I make to the big .csv aren’t visible immediately (like they are in Marked2 with md edits). Instead you need to sync/refresh the file in CSView, but it happens quickly enough to be useful. Maybe a useful suggestion for anyone else looking to do this.