How does mongoDB export data to csv or excel?

  mongodb, question

How does mongoDB export data to csv or excel?
The visualization tool used is robomongo, I don’t know if there is this function.
You can also use the command line.

You’re right upstairs, but if your data is really flat, you can also use it.mongoexportTo export directly to csv format:

mongoexport -h [IP]:[port] -d [db] -c [collection] -u [user] -p [password] --type=csv -f [field1[,field2,field3,...]] > [filename.csv]

mongoexportPlease refer to for more syntax ofDocument