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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting to Excel 1

Status
Not open for further replies.

mbde

Programmer
Mar 14, 2005
55
US
Hello all,

The object: I have a dts package that exports an excel file to a temp directory, then I take that excel file and email it out to a mailing list.

The problem: each time I run the dts it appends to the worksheets/tables.

The constraints: you can not use xpcmd_shell, no privledges. Also you can only give each file a unique name iff you remove the file so not to make a mess of the directory.


I tried a delete from [table$] on the excel connection. But get the error message that Delete is not supported through ISAM. And doing a drop table on Table$ messed it all up the sheet is blank but I can't put data back into the sheet.

Any other Ideas?


Thanks in advance.
 
Create an ActiveX script to delete the file after emailing it out. (Or at the begining of the script, either way).

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
File Scripting object.... thank you
 
Just one thing to note for anyone browsing this post. You have to recreate the Tables/Sheets by calling a create table command for the Excel connection. If you do not then the datapump fails because it can not find destination table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top