![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an activeX task that I am using and trying to write out to an Excel file. I run the task, and if I go into the file right away, it will say that another process still has it open and I can see that my values have been written to the file. If I close it and reopen it, the file is empty. I haven't had to do anything like this for a few years so I'm sure I'm missing something. Any help is appreciated. My script is below: Function Main() Dim objExcel, strPathExcel Set objExcel = CreateObject("Excel.Application") strPathExcel = DTSGlobalVariables("File").Value objExcel.Workbooks.open strPathExcel Set objSheet = objExcel.ActiveWorkbook.Worksheets(1) objSheet.Cells(1,1).Value = "Consumer Aprv_Amt Total" objSheet.Cells(1,2).Value = "Business AsgnLn_Amt Total" objSheet.Cells(1,3).Value = "Business AEEAprv_Amt" objSheet.Cells(1,4).Value = "Distinct BusEmpSeq" objSheet.Cells(1,5).Value = "Distinct PAS EntrdSys_Dt" objSheet.Cells(1,6).Value = "Distinct DNS EntrdSys_Dt" objSheet.Cells(1,7).Value = "Distinct SOL EntrdSys_Dt" Main = DTSTaskExecResult_Success End Function |
![]() |
| Thread Tools | |
| Display Modes | |
| |