I am using LogseqDB as a business database, and I wonder how to export query into csv or execl
There is no direct “export query results to CSV” button in the DB version at the moment, but there are three workable routes, two of them built in:
-
Export the whole graph as SQLite, then get CSV from there. In the DB version, the three-dots menu in the upper right has “Export graph” with an “Export SQLite DB” option, which produces a standard SQLite .db file. From there any SQLite tool can produce CSV - for example the official sqlite3 command line shell: open the file, set “.mode csv”, set “.output mytable.csv”, then run your SELECT. DB Browser for SQLite (free GUI) does the same through its export dialog if you prefer clicking. Since you use the graph as a business database, this route doubles as a real backup.
-
Export a filtered view as EDN. In a node view (list/table of nodes), the view’s own three-dots menu has “Export EDN”, which copies the currently viewable nodes to the clipboard - and it respects your Search and Filter settings, so you can narrow down to exactly the rows you need first. EDN is not CSV, but it is a structured text format, so converting it is a small scripting task.
-
If some of your data still lives in a classic (markdown) Logseq graph: the community answer in an older thread here (“Export query table data to XML/JSON/CSV”) was the Cuvee plugin, which renders a query and offers CSV export, or simply selecting the query result table with the mouse and copy-pasting it into Excel. I cannot confirm whether Cuvee already works with the DB version - that thread was about the classic version.
Sources: the official Logseq DB-version documentation (Graph Export and Views sections) and the SQLite CLI documentation. I have not run this exact pipeline on a business-sized DB graph myself, so if you hit a snag with the SQLite export, the exact error message would help narrow it down.