Delete worksheet in Excel

  • I want to use a DTS Package to re-populate a specific Excel file on a weekly basis. I have two questions.

    1) What is the command inside the SQL Task to delete/truncate all the data in the worksheet as neither of the above work.

    2) Also, is there a way to export data to excel without sending the Column Names. I want the first row to contain data.

    Thanks for the help.

  • 1) Why do you want to delete the data in the worksheet? Wouldn't you just create a new file or overwrite the old one?

    2) If you use Text file output there is an option to turn off column headers. If the text file is standard CSV format Excel will open it just fine.

    Thanks

    Phill Carter

    Edited by - phillcart on 11/25/2002 2:57:43 PM

    --------------------
    Colt 45 - the original point and click interface

  • I use Truncate Table WorkSheetName not sure if DROP TABLE will work and if you just want to repopulate see no reason to try.

    I don't have my server here now, but I believe there is an advanced option on the transformation, maybe the destination tab that you can change this.

  • Interested in something along these lines.

    Truncate table results in a syntax error when I try from an Execute SQL Task.

    ???

    Thanks

    Mark

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

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