Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I store Excel data into Firebase?

Tags:

I have an Excel sheet of all my data (thousands and thousands of rows). How do I get that "loaded" into Firebase to be used?

I've created a Firebase project and tried to look at some tutorials for the realtime database but that's not quite what I want. I don't want real-time data quite yet. I just want data that I have to be loaded in first. How do I go about doing that?

Thanks!

like image 523
noblerare Avatar asked Nov 07 '16 14:11

noblerare


People also ask

How do I upload data from Excel to Firebase?

Step 1: Authenticate Microsoft Excel and Firebase / Firestore. Step 2: Pick one of the apps as a trigger, which will kick off your automation. Step 3: Choose a resulting action from the other app. Step 4: Select the data you want to send from one app to the other.

How do I manually store data in Firebase?

If you head to Firebase Forge (at https://[your-firebase].firebaseio.com ), you can load up the Graphical Debugger for your Firebase and manually add, modify, or remove data, as well as watch it as it changes in real-time.


2 Answers

I figured this out on my own.

First, take the Excel spreadsheet and clean it up in such a way that the first row contains the headers and everything else is the actual data. Remember that Firebase keys (which correspond to column headers) must be UTF-8 encoded which means that it cannot contain . $ # [ ] / or ASCII control characters 0-31 or 127.

Then, save it as a CSV file. For example, on Excel 2013 it would be: File > Export > Change File Type > CSV.

Then, visit various resources online that can do CSV to JSON conversion. The one I used was: http://codebeautify.org/csv-to-xml-json

Finally, take that .json file and load it into the Firebase database. Voila!

like image 51
noblerare Avatar answered Sep 28 '22 12:09

noblerare


STEPS TO UPLOAD COUNTRY LIST IN FIREBASE:

  1. download country list with country code, currency code and currency name what you require:
  2. convert it into csv.
  3. convert csv into json from (https://codebeautify.org/csv-to-xml-json#).
  4. validate json from https://jsonlint.com/
  5. save in a file say test.json.
  6. open firebase with login.
  7. select database.
  8. click on (...) in verticle, beside + - sign,

  9. click on import.

  10. browse and select test.json file
  11. import
  12. now it is great!!!!!!! cheers!
like image 39
SUBRATA NANDI Avatar answered Sep 28 '22 13:09

SUBRATA NANDI