Last post Jun 26, 2008 02:57 PM by AlexB1318
Jun 12, 2008 09:45 AM|satish4asp|LINK
I’m trying to use vbScript to open an excel application (I’m also going to do word).
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = true
objExcel.UserControl = true
This code works in a .HTM file but not an .aspx file.
I get this error -
Microsoft VBScript runtime error: ActiveX component can't create object: 'Excel.Application'
Why wouldn't it work in an .aspx file?
Plz suggest how to do?
Jun 26, 2008 02:57 PM|AlexB1318|LINK
That's because .Net is a different beast altogether. To use excel in .Net you have to add a Com reference to Excel through visual Studio then you can reference it directly like so...