how to import excel file (XLSX) to mongoDB

2020-05-17 06:43发布

I have a set of data as input to be given to MongoDB in XLSX format. How am I supposed to import the Excel file as input to MongoDB?

Is there any plugin available to import xlsx files as input to MongoDB?

7条回答
成全新的幸福
2楼-- · 2020-05-17 07:37

In case the DB server is not local, You will have to specify the host, port, username, password along with the DB name, collection name.

mongoimport --host <hostname>:<port> --username <username> --password <password> --db <db name> --collection <collection name> --type csv --headerline --file /path/to/myfile.csv
查看更多
登录 后发表回答