Hi
I have a application whith three frames. In the third frame ("Results") I
want to display an excel-generated report (the report is generated through
VBA macros, which run when the template is opened (auto_open sub),
collecting the data from an SQL Server). Normaly, in Excel, the template
creates an instans of itself (resultning in an .xls-file). I want my
application to do the same, that is, I want the template (xlt) to create an
instans (xls), load the data into the xls-file and then display the
xls-report in the fram "results".
I'm quite new to VB-Script and I've only manged to come up with the
following code, in report.asp:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Dim xlApp
Dim xlWb
Dim xlSheet
Set xlApp = CreateObject("Excel.Application")
Set xlWb = xlApp.Workbooks.Open("c:\data\report.xlt")
Set xlSheet = xlWb.Worksheets(1)
xlSheet.Name = "Report1"
xlApp.Visible = True
Set xls = Nothing
Set xlb = Nothing
Set xlapp = Nothing
</Script>
This doesn't work. I think I don't get any error messages, though, and the
CPU on the server is working for about 5 secs, so I think the report is
generared but not displayed on screen(?).
Excel 2000 is installed on the server.
Can anyone help me please?
Regards
PO