Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 from text to excel

Author  Topic 

PatDeV
Posting Yak Master

197 Posts

Posted - 2005-11-09 : 16:38:26
Hi all,

I have the dts that runs the fine but is does not over write the excel fiel instead it appends. How can i make to overwrite the yesterday data!!

thanks

rob3rto
Starting Member

8 Posts

Posted - 2005-11-09 : 17:07:23
One easy solution is to create a batch file that deletes the Excel file then copies a blank copy:
del C:\LOC\FILE.xls
copy C:\LOC\FILEblank.xls D:\LOC\FILE.xls

Execute the file as the first step of your DTS.
Go to Top of Page

PatDeV
Posting Yak Master

197 Posts

Posted - 2005-11-09 : 17:35:11
is it possible that i can make copy of that file as name of filename+thedate(such as filename1182005.xls) before deleting it?

Thanks
Go to Top of Page

rob3rto
Starting Member

8 Posts

Posted - 2005-11-09 : 18:20:17
I haven't tried this personally, but: http://www.computing.net/dos/wwwboard/forum/15616.html

Let us know if it works for you.

- rob
Go to Top of Page
   

- Advertisement -