Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.NET, Excel Reports

Status
Not open for further replies.

olivia919

Programmer
May 19, 2005
24
US
I am not sure what I am missing here.
The page is stuck when it is exexuting
xl = CreateObject("excel.application")
"web site found, waiting for reply....."
Please help! Thanks a lot....

Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports Excel

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim xl As New Object()
Dim wb As Excel.Workbook
Dim sh As Excel.Worksheet
xl = CreateObject("excel.application")
'+++++++++++++++++++++++++++++++++++++++++++++++++++++
End Sub
 
Maybe it can't create a new excel object....

Also you shouldn't declare your xl variable as an object - it should be:
Code:
Dim xl as New Excel.Application

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
thanks for the reply. Dim xl as New Excel.Application is one of the methods. i tried that too. had the same kind of problem
 
There may be a permissions problem then...

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top