Are you trying to message excel like the old COM days? If so I believe that you have to do so using com Interop ( because excel is still a COM application ). We have software in he field that does this every day.
Here is a little snippet of code ripped from one of my test apps that plays with excel extensively. I have not added any references to excel in the references section. I am using Late binding which may or may not be appropriate for you setup. We use late binding because the application needs to be able to run in systems where excel is not installed.
Formatting in this message editor is less than ideal but you should be able to get the point...
Please no flames about the inherant issues in this code I know they are many Its only from one of my test rigs folks....
Here goes
Dim ex As Object
Dim sh As Object
Dim iRatingIndex As Integer
For iRatingIndex = 0 To sCategories.GetUpperBound(0)
Dim _workbook As Object
Try
ex = CreateObject("Excel.Application")
Catch trouble As Exception
MsgBox(trouble.Message, MsgBoxStyle.Exclamation, "Houston... we have a problem")
Exit Sub
End Try
ex.visible = True
ex.ScreenUpdating = False
' create the 26 worksheets
_workbook = ex.workbooks.add()
While ex.activeworkbook.worksheets.count < 26
ex.workbooks.item("Book1").worksheets.add()
End While
Dim iIndex As Integer
' set the name of each worksheet
For iIndex = 1 To 26
ex.workbooks.item("Book1").worksheets(iIndex).name = Me._worksheets(iIndex).Name
Next