How do I delete data in Excel through a BIDS package

Posted on 2011-04-19
Last Modified: 2012-05-11
I can create and populate an Excel spreadsheet thru a SSIS package.
I can append data to the sheet from a SQL view, but in the package I cannot Drop or Delete the data in the spreadsheet first.
The package is to be run daily.
How do I delete (or drop) the spreadsheet before repopulating the table. I keep getting 'Table "xxxx" does not exist' - (table or sheet)
Question by:whgsystems
    LVL 21

    Accepted Solution

    Before populate data in excel sheet. first delete excel and create new each and every run.

    Author Comment

    Thanks PatelAlpesh but ..
    Delete doesn't work, nor does Drop Table, in the package.
    Cannot manually delete every day.
    Need to clear (or remove) spreadsheet thru a SSIS package before creating new.

    LVL 75

    Expert Comment

    by:Anthony Perkins
    >>Delete doesn't work, nor does Drop Table, in the package.<<
    I suspect what was meant was that you delete the (spreadsheet) file.
    LVL 21

    Assisted Solution

    by:Alpesh Patel
    Hey you can delete any of file using SSIS. (File System Task is there to satisfy your need)

    Author Closing Comment

    I tried everything suggested beforehand so no real solution but the answers where correct if somewhat short and lacking in examples

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now