In my web site project I need to create an excel file in Server site. Thus I uese the following.
Try
Dim xlApp As Excel.Application = New Microsoft.Office.Interop.Excel.Application()
If xlApp Is Nothing Then
srvHandler.ErrorAnswer = "Excel is not properly installed!!
CreateExcel xlApp"
ServerHandler._InnerError += srvHandler.ErrorAnswer
_Default.errorCall = True
Return
End If
'Dim xlWorkBooks As Excel.Workbooks = xlApp.Workbooks
Dim xlWorkBook As Excel.Workbook = xlApp.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet)
Dim xlWorkSheet As Excel.Sheets = xlWorkBook.Worksheets
Dim misValue As Object = System.Reflection.Missing.Value
xlWorkSheet.Item(1).Name = "Page1"
If xlWorkSheet Is Nothing Then
srvHandler.ErrorAnswer = "ERROR: xlWorkSheet == null!!
CreateExcel xlWorkSheet"
ServerHandler._InnerError += srvHandler.ErrorAnswer
_Default.errorCall = True
End If
The all code it runs excellent in my PC but when I send it to my ISP it produces the problem
At the point of
Dim xlApp As Excel.Application = New Microsoft.Office.Interop.Excel.Application()
It throws me the following error
Create Excel Retrieving the COM class factory for component with CLSID {00024500-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered Exception
I try few ways to overcome but was worthless
Is there someone to assist me on this?