This is for day to day non power users - ie that cant write code, don't have access to sql. For example, a non technical team who says 'hey what devices of XXX model do we have and what are their serial numbers'. This is the most common thing.
They won't know json, won't know api, and right now copy/paste HTML tables and try really hard to get them to get formatted properly in excel or libreoffice.
My thought is generally that if there is already a sql query to build the table, couldnt the same sql query be tied to an 'export' button that instead of displaying a table, just downloads a CSV?
Yes, the only way this would be feasible would be basically a call to the existing code/api that generates the table, to just output the data as a csv instead.
It's still quite a lot of futzing around though, and probably quite a lot of code for something I'm still not sure anyone will use