from txt to XLS

  • Hi all,

     

    I am transfering data from Text file to Excel file but the schedule fails after it runs first time saying that the file is open. How can i make it work that it will override the data everyday when job runs?

    Thanks

  • I've seen similar items with Excel. You might try a drop table/ create table (exec sql task) at the beginning of the package. I used to use two tasks and use the "create" button in the transform package to get the create table code.

  • how can i drop in excel!

    thanks

     

  • Use the create code and change to be "drop table xxx"

    Remove all the column stuff

  • does it save it as a task because the package will run everynight! so i want to drop table in excel file first and then recreate it.! what could be the porcedure?

    thanks

  • Hi,

    I found a WSH (Windows Scripting Host) script that does import from csv file to Excel. You can modify the script if your text file is not csv (comma-separated). This script is like 1 page with a lot of comments, so it is very readable.

    http://ourworld.compuserve.com/homepages/guenter_Born/WSHBazaar/WSHExcel1.htm

    Excel: Import a CSV file

    You may schedule this script in Windows Scheduled Tasks. It will let you not to use DTS at all.

    MORE, Just Added:

    I tested this script, it works well. It does some outputs and printouts after initial load for the example, you have to remove this from non-ineractive script

    Regards,Yelena Varsha

Viewing 6 posts - 1 through 5 (of 5 total)

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