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)
 DTS to Excel Problems

Author  Topic 

wotrac
Yak Posting Veteran

98 Posts

Posted - 2005-10-01 : 14:37:17
I am trying to export SQL data to an Excel spreadsheet using DTS.
As the spreadsheet needs to be updated every day, I am using a SQL task in DTS to DROP the Table(Sheet) and then transfer the data across.
It all works fine the first time, but every subsequent transform
the data is cleared from the sheet, but the new data appears 1 row down from the end of the previous transfer,

eg 1020 rows transformed
Drop the table, which clears out the 1020 rows
The new data then gets inputted starting at row 1021 and so on.

Can anyone suggest what is causing this

bnhcomputing
Starting Member

22 Posts

Posted - 2005-10-03 : 22:32:52
I'm not an Excel expert but:

As I understand it, when the data is transfered, a "Named range" is created. This named range is updated to the size of the number of rows transfered. The DTS Drop doesn't removed/update the named range. Thus, the transfer picks up where it left off, at the end of the named range. The only way I know of removing a named range is with Excel automation, which has potential issues.

If I'm wrong here, anybody else feel free to correct me.

Hubert Hoffman
Go to Top of Page
   

- Advertisement -