I am displaying the records fetched from some table in Microsoft excel.

To open the Excel allplication I have written the code like this

sub Show()
dim xlApp as excel.application

set xlapp = new excel.application

'Add workbook
'add worksheet
'Populate data

xlapp.visible = true

end sub

If I call show() it will open an excel application, If I close the Excel application (File - exit in excel) and try to call the show() function again, excel application is opening but worksheet is not visible. If I click on print preview I am able to see the data.

What's the solution for this??

thanks,


Santosh N
Sr. Software Engineer,
Wipro Infotech, India.