July 5, 2007 at 6:37 am
I am using SQL Server as Source and Excel as Destination for creating SSIS Package Programmatically.
I have set following properties in Connection Manager for Excel.
Dim
ConFile As ConnectionManager = myPackage.Connections.Add("EXCEL")ConFile.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\SSIS\Book1.xls;Extended Properties='Excel 8.0;HDR=YES';user id =Admin;password=;"
ConFile.Properties(
"Name").SetValue(ConFile, "MyExcelConnection")
ConFile.Properties("FirstRowHasColumnName").SetValue(ConFile, True)
ConFile.Properties("ExcelFilePath").SetValue(ConFile, "C:\SSIS\Book1.xls")
ConFile.Properties(ServerName").SetValue(ConFile, "C:\SSIS\Book1.xls")
ConFile.Properties("RetainSameConnection").SetValue(ConFile, False)
ConFile.Properties("ExcelVersionNumber").SetValue(ConFile, 3)
I am getting "Exception from HRESULT: 0xC020801C" on DestInst.AcquireConnections(Nothing) method.
What might be the reason for the above error and even column Mapping is not possible.
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply