简体   繁体   中英

How to import bulk data in firebase firestore database from excel or google spreadsheet or CSV using flutter

I have flutter app where User fill a long form. but I want to add another button where when user want click and upload 'excel or spreadsheet or CSV' having same data as form and this data store in firebase firestore. please help me to overcome this problem.

There's no API for doing that, Firestore doesn't have an option in which you can upload an Excel or a CSV file and convert the data automatically to Firestore. To solve this, you should write some code for that. As also Krish Bhanushali suggested in his comment, you need to read the file , line by line, save that data into an object of a custom class, and then write all the data to Firestore. This means that each line you read will be added in Firestore as a document.

Use Firefoo. connect to the db, import your csv, done.

Its trialware but it works flawlessly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM