Create a CSV export for spreadsheets or BI tools.
Section: Import and export data
Export selected fields to CSV
bash
bash
mongoexport --uri="mongodb://localhost:27017/appdb" --collection=users --type=csv --fields=name,email,created_at --out=users.csvExplanation
CSV export is handy when downstream tools expect a flat tabular format.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Import and export data