I'm writing
The problem is in the line:
xlWb = xlApp.Workbooks.Add()
it terminates the execution and shows me an exception:
Old format or invalid type library
I take reference Microsoft Excel Librery 11.0 Object Library
(Ver 1.5)
from
C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE
Any ideas?
Code:
Dim xlApp As Excel.Application
Dim xlWb As Excel.Workbook
Dim xlSh As Excel.Worksheet
xlApp = CreateObject("Excel.Application")
xlWb = xlApp.Workbooks.Add()
xlSh = xlWb.Item(1)
xlSh.Name = "My Sheet"
xlWb.SaveAs("d:\reports\report1.xls")
xlApp.Quit()
The problem is in the line:
xlWb = xlApp.Workbooks.Add()
it terminates the execution and shows me an exception:
Old format or invalid type library
I take reference Microsoft Excel Librery 11.0 Object Library
(Ver 1.5)
from
C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE
Any ideas?