
文件流
文章平均质量分 79
刘可爱呀
努力且上进,
热爱生活且热爱编程
展开
-
java实现读取excel或者txt文件,导入MongoDB数据库
在工作中经常遇到读取的文件的问题,于是做了一个小总结。1.Excel表格内容如下2.创建main主类public static void main(String[] args) throws Exception { ReadExcel read = new ReadExcel(); File file = new File("D:/test/c.xls"); ...原创 2018-04-12 13:53:49 · 5439 阅读 · 9 评论 -
使用java实现读取txt文件,导入到MongoDB中
1.txt文件如下2.创建main主类public static void main(String[] args) { MongoClient mongo = new MongoClient("localhost", 27017); MongoDatabase db = mongo.getDatabase("lxj"); MongoCollection&l...原创 2018-04-12 14:06:10 · 2298 阅读 · 0 评论