Posts List

mongodb从excel中导入数据

mongoimport工具可以从指定的CSV, TSV 或者 JSON数据中导入到mongoDB。 而excel表格可以直接另存为csv格式。 $ mongoimport connected to: 127.0.0.1 no collection specified! Import CSV, TSV or JSON data into MongoDB. options: -h [ --host ] arg mongo host to connect to ( <set name>/s1,s2 for sets) -u [ --username ] arg username -p [ --password ] arg password -d [ --db ] arg database to use -c [ --collection ] arg collection to use (some commands) -f [ --fields ] arg comma separated list of field names e.