Spreadsheets as a data export format are just horrible, but clients seem to consistently request it. ButIDontWannaItJustFeels…ComeON!! don’t you know we have a beautiful REST JSON API?!
Okay so at least there is Apache POI to help out.
I made a couple simple utility methods that take a Map of data and either turns it into a spreadsheet or fills in a spreadsheet that you feed it. Not enough code to make into a github project or plugin, but a Gist? yeah sure – here ya go! Maybe you’ll find it useful.
As is, it outputs .xls files and you could use the output to render a spreadsheet file. You can also easily make this .xlsx but it requires including a couple more large POI jars.