I combined this with a simple API to update a CSV file using Deno/deno-csv library, allowing an Ansible job to easily update a CSV file via the API with Ansible URI module, and then have that same CSV file viewable/downloadable in a simple and easy/dashboardy way (with CSV-to-html-table). Copilot created the Deno/deno-csv CSV API code and then with a little back and forth I added static website functionality (to serve the CSV table), and I had a /view and a /update route. I'm just a sysadmin but I love piecing together stuff like this. Thanks Derek!
Comments
promiseofbeans•2h ago
How does this handle CSV's with no headers, or data that's offset from the top? (e.g. a row for title and subtitle, before the table headers & data)
brothrock•2h ago
Great question. If it can’t skip lines, I’m out.
mokanfar•2h ago
That is classified as an edge use-case. Realistically speaking I don't think the point of this hastily whipped up demo was to be a replacement for google sheets.
Bimos•1h ago
Yeah but since it claims "any CSV file", and CSV files are widely known to be variate, I didn't expect it fails to work on edge use-cases.
neilv•2h ago
Obligatory suggestion to developers who use this: Don't copy&paste reuse that custom formatting code from the demo for arbitrary CSV, since the code inserts arbitrary strings into both HTML attribute value and CDATA contexts, without escaping special characters.
return "<a href='" + link + "' target='_blank'>" + link + "</a>";
indigodaddy•1h ago
Dang, I'm not the author, so do not think this should be a show HN, at least not with me remaining as the submitter. I did not submit it as such, and then later an admin edited it to a show HN, and put my comment (that I added for context later for how I made use of the tool) as the description. That blurb currently as the description should probably be returned to a plain comment. All I did was stumble upon Derek's repo when I was looking for something to stitch together for a particular use-case.
pphysch•1h ago
I was wondering why this wasn't expressed as a webcomponent, then saw it's a decade old. Nice.
strunz•1h ago
Love this idea, wish I could pipe a CSV right to the tool though!
sn0n•40m ago
This is amazing!! I finally have an excuse to use spreadsheets again! I've been avoiding them for years, Legitimately.
65•33m ago
Pretty cool. I'm wondering how large of a CSV you could feasibly load with this. I always have to manually open CSVs in text editors if they're too large for Excel, so if this is a better UI for it that can handle large files I will definitely use this.
indigodaddy•13m ago
Perhaps setting paging to true would improve the handling of a very large CSV
joseangel_sc•20m ago
i’m gonna test this on a 52k rows document, very curious if it can handle that
indigodaddy•17m ago
Perhaps turn paging on in the config for a very large CSV?
promiseofbeans•2h ago
brothrock•2h ago
mokanfar•2h ago
Bimos•1h ago