Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Having a problem getting Excel to work from my .Net VB Program
This should be a simple question for those of you who do this all the time. I
have a web based report that I need to allow the user to export to Excel. I followed all the instructions from Microsoft web based knowledge areas and included the COM Excel 9.0 library. I issued the following code: ================================================== == Private xlapp as Excel.Applicaiton Private xlsheet as Excel.Worksheet .... xlapp = GetXLApp() '<== Error happens in this function xlapp.Workbooks.Add() The function GetXLApp is below: Public Function GetXLApp() As Object Try GetXLApp = CreateObject("Excel.Application") ' <== Returns error GetXLApp.Visible = True Catch ex As Exception lblStatus.Text = Trim(ex.ToString) End Try End Function ================================================== = The error message is: System.NullReferenceException: Object reference not set to an instance of an object. at QueMgmtReport.Queue.Activity_Report() in \\net-plan\wwwroot$\QueMgmtReport\Queue.aspx.vb:line 158 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
emailing excel worksheet from excel program d/n work? how to fix? | Excel Worksheet Functions | |||
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene | Excel Discussion (Misc queries) | |||
Program for assigning work shift hours | Excel Discussion (Misc queries) | |||
What program would work better? | Excel Discussion (Misc queries) | |||
Program no longer work on Excel 2003 | Excel Programming |