Home > Back-end >  How export all firestore data to excel of csv?
How export all firestore data to excel of csv?

Time:12-08

In my database has one users table in that table have many documents(users) in each documents have many subcollections. I want export all users table with all subcollections to excel or csv. Is it possible ? Can export all data ?

database users collection enter image description here

image of one of the subcollection

enter image description here

CodePudding user response:

To export data from Google Firestore, you can use the gcloud command-line tool to export your data as a JSON file.

Here are the steps to export data from Google Firestore:

  1. Install the gcloud command-line tool, if you haven't already. You can find instructions for installing gcloud here: https://cloud.google.com/sdk/install

  2. Open a terminal or command prompt and navigate to the directory where you want to save the exported data.

  3. Use the following gcloud command to export your Firestore data:

    gcloud firestore export gs://[BUCKET_NAME]
  1. Finally you can use pandas or microsoft excel to convert exported json file into csv or excel
  • Related