 |
Online Help System
|
 |
Back to Brilliant Database Web-Site |
Write to Support |
Help Index
Exporting to 3rd part DB using script
Introduction
Besides basic data export, i.e., setting correspondence between fields, while exporting data it is possible to change cells of a different database using a script. This may be quite useful if it is not possible to find the exact correspondence between your DB fields and fields of the DB you need to export to. Example
The easy way to understand script usage is to give an example. For instance, there is an Excel-based DB stored at C:\example.xls" Suppose the main sheet of this DB has the following cells:
| Report Date: | - | -
| | - | - | -
| | Title | Quantity | Price
| | - | - | -
|
We need to fill in this document using data from our database.
- Open the export dialog box (File > Import/Export > Export To 3rd Part Database).
- Choose example.xls database and tables within this database.
- Click the Advanced tab and select the Don't export database software database software records. I will use script to update external database option.
- Open the script editor by clicking Edit Script
- Create another script by using the Export DB Operation action:
Script listing:
- Line 1. Go to the first line in the table.
- Line 2. Start data editing of this line.
- Line 3. Enter the current date in cell #2.
- Line 4. Save changes.
- Line 5. Get a list of database software database software records into [$database software database software records] variable using a query.
- Lines 6, 12 Perform lines 7-11 for each database software database software record of the set.
- Line 7. Add the database software database software record to the table.
- Lines 8-10. Enter the database software database software records from our database into the Excel table.
- Line 11. Save changes.
- Save the script and click the Export button.
If everything was done correctly, the file example.xls should contain the following data:
| Report Date: | 10.11.2007 | -
| | - | - | -
| | Title | Quantity | Price
| | - | - | -
| | Apple | 16 | $32
| | Lemon | 4 | $12
|
Saving export settings as a template will allow editing the created script from the script editor (Designer > Edit Database Scripts).
See Also:
Synchronization
Importing/Exporting from 3rd part DB.
Custom Export Editor
Custom Import (Parsing)
|