How does one export a Room table to a CSV format?

前端 未结 3 1035
广开言路
广开言路 2021-02-04 22:29

I have an app right now that stores data in a Room database using several entities. What I need is to take the contents of a table, convert the data into a CSV format, and then

3条回答
  •  醉梦人生
    2021-02-04 23:13

    It's really easy following these steps:

    1. On Android Studio go to View - Tools - Device Files Explorer
    2. Navigate to /data/data//databases/ and export the file.
    3. Download http://sqlitebrowser.org
    4. Open de DB on SQLite Browser, click Browse Data, select the table.
    5. Go to File - Export - Export table(s) as CSV file...

    Source: https://medium.com/@mattyskala/browse-sqlite-database-in-android-studio-4fbba6cca105

提交回复
热议问题