![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
We used the DTS looping procedure to transfer csv files and everything was fine - but when we used for transfering excel files, it stop on the first file. We check and we realize on each files, the rename the worksheet from sheet1 to any other name such as "Zone 1 San Diego 2003_12_08 to " That's why we have this code below to rename the worksheet back. But somehow it did not work. Please help us to configure the proper function to make it work. Thanks. Function Main() 'use script to rename all sheets to a common name dim xlObj Set xlObj = CreateObject("Excel.application") xlObj.Workbooks.Open DTSGlobalVariables("gv_FileFullName").value xlObj.ActiveWorkbook.Sheets(1).Name = "DataSheet" xlObj.ActiveWorkbook.Save xlObj.Quit Set xlObj = Nothing Main = DTSTaskExecResult_Success End Function |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |