Selecting Database Data for Export

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Exporting Database Data >

Selecting Database Data for Export

The Selection tab of the "Export database data" dialog box is the same for all export file types. The option that has been used last is active by default. If you want to export your database data to a different file format, select the respective icon on the left side of the dialog box and change to the Options tab in order to define the export options for XML, XML Structure, CSV, HTML, or Excel.

tab_exp-selection

The Source group box of the "Export database data" dialog box provides a toolbar containing the same icons as the Online Browser (layout, filter, favorites, and Object Locator) as well as the Show checked objects only ic_show-checked icon. The latter is useful if you have a large number of tables in your database and want to export data from only a few of them. After you have activated the check boxes of the appropriate tables, clicking the Show checked objects only ic_show-checked icon displays only the tables that you have selected for export and hides the tables not concerned.

 

 

To export database data:

1.Make sure that a data source is active in the project tab.
2.Select the menu option Tools | Export database data, or press Ctrl+E, or click the Export ic_export button in the Tools toolbar. The "Export database data" dialog box opens.
3.Click the desired icon on the left side of the dialog.
4.In the Source database group box, select the data source from the drop-down list.
5.Select the data you want to export in the Source group box. Do one of the following:

 

The Table radio button is selected by default. The data source you selected above is displayed as it appears in the Online Browser. The filter and favorites functions as well as the object locator are all available in the toolbar.
Clicking the SQL radio button displays SQL commands or allows you to enter them directly.

 

Note:If you have opened the "Export database data" dialog box from the toolbar of the SQL Editor window and not from the Tools toolbar, the SQL radio button is active by default and the contents of the SQL Editor window appear in the text box.

 

If you select tables while the Table radio button is selected and then click the SQL radio button, the SELECT statements for those tables will be generated automatically and appear in this window.

exp-xml2

6.If required, change the database you want to export the data from by clicking on the arrow to the right of the database name and selecting a database from the drop-down list.
7.Activate the check boxes of the tables you want to export from the database.
8.Specify the Destination to which you want to export the data. Do one of the following:

 

Optionally, enter a prefix that will be added to the table name when the table is exported.
Select Path and enter a path in the field or use the Browse ic_browse button.
Select Export to XMLSpy.

 

9.Select the table you want to preview and click the Preview button in the Preview group box.

gb_exp-source

Note:The Preview button is only activated if a table is selected.

 

The table data now appears in the Preview group box and the Preview button changes to Reload.

gb_exp-preview

10.For each column, click the icon next to the column name to select whether you want it to be exported to the export file as an element ic_export-col-as-element, an attribute ic_export-col-as-attribute, or not appear at all ic_exclude-col. In order to restore the original setting, click the Reload button.
11.Change the file name of the selected table in the Export Table Name field, if necessary.
12.Click Export. Each of the selected tables is exported to a separate file. A message appears that informs you about the successful export of your database data.

 

Exporting data from designs

If you have a specific design open in a Design Editor window, you can easily export the data that is contained in the tables of this particular design. The Design Editor window provides an additional Export ic_export button which is active if at least one table in the Design Editor window is selected. When you click this button, the "Export database data" dialog box opens with the Table radio button activated and the check box(es) of the selected table(s) already checked. You can still add additional tables to the export definition.

 

Note:Clicking the Export ic_export button in the Tools toolbar will also open the Export database data dialog box. However, in this case no tables will be preselected for export.

 

 

To export data from a Design Editor window:

1.Make the Design Editor window whose tables you want to use for export the active window and select at least one table.
2.Press the Export ic_export button in the Design Editor window. The Export database data dialog box opens. The tables that are currently selected in the Design Editor are already preselected in the Source group box.
3.Do one of the following:

 

Activate the Path radio button and enter the path you want the destination files to appear in.
Activate the Export to XMLSpy radio button if you want your exported data to be displayed in XMLSpy. Note that this option is not available for export to Excel files.

 

4.In the Source group box, select a table and click the Preview button in the Preview group box.
5.Optionally, change the file name in the Export Table Name field.
6.If required, exclude columns from export or export them as attributes.
7.Optionally click the Options tab to change the options for XML, XML Structure, CSV, HTML, or Excel.
8.Click the Export button when all the settings are correct. A message box appears to inform you about the success of the export.
9.Click OK. The data is exported under the name specified in the Export Table Name field in the desired format and either stored under the path you specified or opened in XMLSpy for further editing.

© 2019 Altova GmbH