How to automatize the export query to Excel spreadsheet process?
DTM Query Reporter was created to achieve a simple goal. It is export results of the query execution.
One of the most popular formats that supported by the software is Microsoft Excel.
DTM Query Reporter has two execution modes: GUI and unattended. The second one is compatible with batch files, schedulers, etc.
I.e. users allowed to automate the export process.
Try out free demo version
of the software.
There are steps to automate the export to Excel file:
- Establish connection to database or desktop data file.
- Enter SQL script/statement or load it from disk file (.sql). The program supports SELECT statements and procedure calls.
- Specify output file name (.xls or .xlsx). The tool supports $DATE$ and $TIME$ macros as a part of the document name.
- Save created project file to disk.
- Make command line with '-c' option. It switches the software to mode without graphical user interface.
- Pass the command line to schedule system like: at 09:00 "qr.exe -c d:\SQL\CustomersReport-2016-Q2.qrp"
The reporting tool offers a few features to customize the reporting process. Most important are:
- Script parameterization. The user enabled to replace parts of the script to '?1', '?2', etc parameters. The program loads actual values from an external source (file) and tune the script before each execution.
- Use custom report header, footer or title.
- Modify or setup new style file (HTML and CHM output only).