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.
Author |
Topic |
Peter99
Constraint Violating Yak Guru
498 Posts |
Posted - 2008-12-12 : 15:17:19
|
Hi I have one dts package which creates monthly audit report of users in two servers. I want to put result in one excel file say file1 with one sheet for each server, server name should be the sheet name. So once I open excel file, it should have two sheets one for each server. I don't know vb script or activex script. Any help in this regard will be appreciated. |
|
shaunc
Starting Member
28 Posts |
Posted - 2008-12-15 : 14:14:25
|
You could create an Excel spreadsheet template, with two blank worksheets named however you want (SERVER1, SERVER2). Set this up as your Excel destination file in the DTS, and add two data pumps to it - one to export the data for each worksheet. When your DTS job runs, prior to running the data pumps, have it do a couple of Execute Process tasks that use the DEL and COPY commands to delete any pre-existing spreadsheet and copy the template to the destination filename. |
|
|
|
|
|