Hi,
I create DTS 2000 package but it come out with 2 Excel file.
DTS Flow Design :
http://img363.imageshack.us/my.php?i...5891081fx7.jpg
1. ActiveX SCript to create Excel with timestamp
2. Create Table 'Redemption' in Excel
3. Connection from Database
4. Output the Excel
ActiveX Script
Function Main()
Dim appExcel
Dim newBook
Dim oSheet
dim oPackage
dim oConn
Set appExcel = CreateObject("Excel.Application")
Set newBook = appExcel.Workbooks.Add
Set oSheet = newBook.Worksheets(1)
'Specify the name of the new Excel file to be created
DTSGlobalVariables("fileName").Value = "C:\Redemption_" & Year(Date) & Right("0" & Month(Date), 2) & Right("0" & Day(Date), 2) &".xls"
With newBook
.SaveAs DTSGlobalVariables("fileName").Value
.save
End With
appExcel.quit
'dynamically specify the destination Excel file
set oPackage = DTSGlobalVariables.parent
set oConn = oPackage.connections(2)
oConn.datasource = DTSGlobalVariables("fileName").Value
set oPackage = nothing
set oConn = nothing
Main = DTSTaskExecResult_Success
End Function