Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear contents of excel before exporting from DTS

Status
Not open for further replies.

sonname

Programmer
Joined
May 18, 2001
Messages
115
Location
US
Hi
I have a DTS package that exports a view to an excel spreadsheet. The problem that I have is that it does not append data over existing data in the spreadsheet, it continues adding data. How can I clear the spreadsheet in DTS?
Any help is appreciated.
Thanks in Advance.
 
I worked round this problem by doing the following:

Adding an Execute Process Task within the DTS package, which runs a bat file, which in turn contains the DOS, command COPY.

This copy command copies an empty Excel XLT template over the top of Excel XLS spreadsheet. Obviously then a further task adds the data to the now empty spreadsheet.

Works fine but not the most elegant of solutions. As it's only required on just one job and was need in a hurry I didn't worry too much about elegance.

Rick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top