Hi Sonal,
Apologies for the very late reply.
There is no way to export multiple result sets to the same Excel sheet; a new one is created for each result.
The @echo command writes to the Log tab in DbVisualizer, but you can use the ExcelTitle and ExcelIntroText parameters to add comments in the sheets:
@export on;
@export set filename="C:\data\Test_output1.xls" appendfile="clear";
@export set ExcelTitle="First result";
select * from table1 limit 5;
@export set ExcelTitle="Second result";
select * from table2 limit 5;
@export off;
Best Regards,
Hans
Sonal Aggarwal
Hi, I am trying to export the outputs of multiple queries in a single Excel worksheet and I want to insert blank rows and comment rows between the outputs.
I am using the following query-:
@export on;
@export set filename="C:\data\Test_output1.xls" appendfile="clear";
select * from table1 limit 5;
@echo "mytext";
select * from table2 limit 5;
@export off;
But the outputs of the two queries are getting exported in separate worksheets of the workbook and the comment line is not getting printed anywhere.
Please help me with this.