Open a file by using ActiveX from a task on a DTS package

  • Hello,

    I have a DTS package and would like to add an ActiveX task to open an excel file.

    Would anybody please help me on how to write this ActiveX code to open an excel file?

    thanks!

     

  • Why would you do that instead of just using an Excel connection in the DTS designer ?

    If you must use ActiveX script, use the FileSystemObject in the Microsoft Scripting runtime:

    http://www.sqldts.com/default.aspx?292

     

  • I really got a headache. 

    What I am trying to do is to open an excel file automatically, so the macro in this excel file can do some stuff for me. I had a .bat file but it did not work. I guess the SQL server that I am working with does not support .bat or something like that. Sometimes, it works, sometimes it does not. So i am trying to look for a different way to open this excel file so the macro can run.

    Can I really "OPEN" an excel file automatically by using ActiveX?

    Thanks!

     

  • You should be able to execute the .bat file from DTS using the Execute Process Task object in the DTS Task area of the DTS designer window. If you tried this in the past and it failed or was unreliable could you please post the error log message. Also do you have access to the server that is hosting the SQL instance or do you only have access through Enterprise Manager on the lan?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply