Export — Available for EE 4.0
Export data as CSV or XML.
AJW Export is a quick plugin for EE2/3/4 that allows you to export data from the ExpressionEngine database as a CSV or XML file.
An example CSV export would be:
sql="SELECT member_id, screen_name, email FROM exp_members"
which would export the results to the browser. Adding a filename= parameter will cause it to download to a file.