Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
'null reference' when trying to use WorksheetFunction from C#
I've got Microsoft.Office.Interop.Excel referenced in a .NET 2.0 class. No
problems with compilation but at runtime, I get 'null reference' errors when trying to use an Excel function. For example, using Excel = Microsoft.Office.Interop.Excel; Excel.WorksheetFunction wsFunction = null; double weibull = wsFunction.Weibull(1, 2, 3, true); I receive the 'null reference' error on the wsFunction.Weibull call. I've also tried... internal Excel.Application ThisApplication { get { return thisApplication; } } private Excel.Application thisApplication = null; double weibull = thisApplication.WorksheetFunction.Weibull(1, 2, 3, true); and receive the same error when trying to use a WorksheetFunction call. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Maintaining cell reference after sorting | Excel Discussion (Misc queries) | |||
Null values in charts and how to override the goal seek functionality | Charts and Charting in Excel | |||
Referencing cell in another sheet yields null? | Excel Worksheet Functions | |||
Flexible Cell Reference | Excel Discussion (Misc queries) | |||
Absolute Worksheet reference number | Excel Discussion (Misc queries) |