Add ability to export CSV as raw or formatted

The title pretty much sums it up.

Closes #2341.
You technically don't need `false` here, but no bigs