Home > Archive > MS SQL Server DTS > September 2005 > SQL to Excel Package









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL to Excel Package
Bil Click

2005-09-29, 11:24 am

I am trying to create a package that copies all rows from a SQL 2000 table to
an Excel file, overwriting any current Excel rows. It all works except it
appends the new data instead of overwriting.

Here are the steps:
Use DTS Export Wizard

Data Source: Local server & choose database

Destination: MS Excel 97-2000, browse to dir, enter new filename.xls

Specify Table Copy or Query: Table Copy

Select Source Tables and Views: Check table in Source column, click on
elipses in Transform column

Coulmn Mappings & Transformations: Create destination table is already
selected, check Drop and recreate destination table

Save DTS package, name it and run

Gets error first time on Drop table step

Subsequent execution of package results in 3 steps:
Drop table ...
Create table ...
Copy Data from ... to ...

But the previous data still exists in the xls file. I must be missing
something obvious here, but sure do not see it! Thanks in advance......






Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com