Exporting Database Data
DatabaseSpy can export database data to XML, CSV, HTML, and Excel 2007 or later (.xlsx) format. You can export data either directly from specific tables or views, or by generating or typing SQL SELECT statements. At table level, you can choose, for each column, whether it should be exported or omitted. If the export format is XML, you can choose whether to export each column as element or attribute, or not export it at all.
To export data, click the Export toolbar button or select the menu option Tools | Export database data... (Ctrl+E). This opens the "Export database data" dialog box, where you can select the data to be exported and define the export options.
The "Export database data" dialog box contains two tabs, Selection and Options. The Selection tab is the same for all export types while the Options tab depends on each export file type. You can change the export file type by clicking the respective icon in the left area of the dialog box.
In case of XML, you can choose whether the exported XML should reflect the child-parent (foreign key) relationships that exist between database tables—to do this, click XML Structure on the export dialog box. Below is an example of an XML file exported with the XML Structure option. Notice that the "addresses" table is a child table of "users" in the database. Namely, the "user_id" column in the "addresses" table references the "id" column in the "users" table.
<?xml version="1.0" encoding="UTF-8"?>
The Source tree view is very similar to the Online Browser window, with all its features and options. Here you can select the individual tables for export, as further described in Selecting Database Data for Export.