-
Export the Excel file as CSV
-
Use this tool to convert this CSV to JSON
-
Use a text editor Find-and-Replace to change
{
to"x": {
. Also remove the[]
in the beginning and ending. -
Use this Linux command to change each of the
x
to incemental numbers
awk 'BEGIN { cntr = 0 } /"x":/ { cntr++ ; print "\""cntr"\":" } !/header/ { print $0 }' codebeautify.json > output.json
(Remember this code doesn't do the exact thing for us, so one more step)
-
"x":
is not removed, so to remove it use text editor Find-and-Replace to change"x":
to blank. -
Last step, but important - convert the encoding of the file to strictly UTF-8, nothing else is accepted.
Done! Goto Firebase Database Console and upload the output.json using Import JSON.
Recommended to use Visual Studio Code for the purpose (especially Step 6).