runrig-coop / early-warning-system

An early warning system for Richland Gro-Op to coordinate field health.
GNU General Public License v3.0
2 stars 1 forks source link

Import/export as CSV or .xlsx file #19

Open jgaehring opened 1 year ago

jgaehring commented 1 year ago

While refamiliarizing myself with the progress we'd made with #10, I got to thinking about other file formats we could target, and I found this handy lil CLI tool, qsv or "Quicksilver", which we might be able to crib from since it's written in Rust:

https://crates.io/crates/qsv

Specifically it has excel and to commands for reading and writing Microsoft's .xlsx format, which I believe is what RGO uses. There's even some functionality for writing to SQLite files and using Polars SQL against a collection of .csv files, which is pretty sweet!

Obviously, this is a kitchen-sink CLI utility, not ideal as a dependency. It'd be great if it's possible to import just a couple of those modules somehow, but I'm not sure what best practices are for doing that in Rust. Either way, we may also get a lot of functionality out of the csv crate, which is what Quicksilver uses under the hood:

https://crates.io/crates/csv

jgaehring commented 1 year ago

We should keep in mind, both here and in #24, the potential of using a Power Query in Excel to sync data between a .xlsx file and .csv file.

jgaehring commented 10 months ago

Note that I renamed this issue to focus on CSV and Excel formats specifically, to differentiate it from #30 and others.