mongoDB怎么把数据导出为csv或excel?
为情所困
为情所困 2017-05-02 09:20:28
0
4
743

mongoDB怎么把数据导出为csv或excel?
用的可视化工具是robomongo,不知道有没有这功能。
用命令行也行。

为情所困
为情所困

reply all(4)
黄舟

What you said above is correct, but if your data is indeed flat, you can also use mongoexport to directly export it to csv format:

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

mongoexport please refer to the documentation

给我你的怀抱

MongoDb itself is non-relational. Currently, mainstream MongoDb operating software does not and does not need to support the function of exporting to a relational table.
To export to csv or excel, you can only write a program yourself.

伊谢尔伦

The command line can be or mongochef~the best one

小葫芦

mongoexport is very easy to use! Always use mongoexport

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!