I want to read the xlsx file and save it in the mongodb.file file. Minimum file size: 100mb. I want to read an xlsx file and parse it in json and save it in mongodb.
You can read XLSX files using Apache POI (as described here http://java67.blogspot.com/2014/09/how-to-read-write-xlsx-file-in-java-apache-poi-example.html )
Since mongodb has a 16 MB limit per document ( http://docs.mongodb.org/master/reference/limits/ ), you might want to use GridFS to write raw data. Here is an example how to do it:
https://blog.codecentric.de/en/2012/11/mongodb-supplemental-gridfs-example-in-java/
[UPDATE] If you actually have many small documents in an XLSX file (for example, on each line), you can use the batch method of inserting documents into blocks (see How to insert several documents at once into MongoDB via Java as an example).
Source: https://habr.com/ru/post/1607318/More articles:Может ли Swagger генерировать перечисление Java? - javaLookupError: нет установленного приложения с меткой 'user' - pythonThe Raml validator throws an error in the javax.xml.validation.SchemaFactory.newSchema file - maven-2UICollectionViewCell size according to screen / FrameSize Swift - iosHide icon using jQuery - jqueryDql query error class undefined - symfony(React Native) lock screen in landscape - react-nativeSetting bool value for input and getting string type using javascript / jquery - javascriptHow to scale Orion GE? - fiwarePprof and golang - how to interpret the results? - linuxAll Articles