Hi,
I've got an instance of SQL Server 7 where I'm using a DTS package to import some excel data into a table in my database.
The Excel sheet is a simple 3-column table with the data beginning in row1. However, instead of importing row1 as data, DTS is trying to force the values in row1 to be the column names of the Excel file, therefore I lose the first row on import.
I found the following ActiveX script on the net, which is supposed to prevent this behaviour, but it doesnt appear to be working.
How do I connect the ActiveX Script task to my Excel connection to make this work?? The weird thing is that I've had this working before, and I cant work out how to get it working again.
Any ideas, much appreciated!
Cheers
Neil
I've got an instance of SQL Server 7 where I'm using a DTS package to import some excel data into a table in my database.
The Excel sheet is a simple 3-column table with the data beginning in row1. However, instead of importing row1 as data, DTS is trying to force the values in row1 to be the column names of the Excel file, therefore I lose the first row on import.
I found the following ActiveX script on the net, which is supposed to prevent this behaviour, but it doesnt appear to be working.
How do I connect the ActiveX Script task to my Excel connection to make this work?? The weird thing is that I've had this working before, and I cant work out how to get it working again.
Any ideas, much appreciated!
Cheers
Neil
Code:
Function Main()
dim pkg
dim conXL
set pkg = DTSGlobalVariables.Parent
set conXL = pkg.Connections("Microsoft Excel 8.0")
conXL.ConnectionProperties("Extended Properties").Value = "Excel 8.0;HDR=NO"
Main = DTSTaskExecResult_Success
End Function