Replace Excel worksheet contents from SQL Query via DTS

  • If I run a query and drop the results into c:\file.xls then the worksheet in the XLS file just keeps growing (appends data not replaces data).

    I cannot see how to remove the entries and replace with current query values so that the excel file only has the results of that query just run.

    The excel file has formatting that I need to keep too, so creating a CSV file won't help.

    TIA

    Neil.

  • Have a look at the below article.  Specifically where it talks about the drop table command instead of delete.

     

    -Luke.

    http://qa.sqlservercentral.com/columnists/jsack/capturingtheerrordescriptioninastoredprocedure.asp

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Thanks Luke, this looks just what I was after.

    Neil.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply