How do I delete data in Excel through a BIDS package

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)
Who is Participating?
Alpesh PatelAssistant ConsultantCommented:
Before populate data in excel sheet. first delete excel and create new each and every run.
whgsystemsAuthor Commented:
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.

Anthony PerkinsCommented:
>>Delete doesn't work, nor does Drop Table, in the package.<<
I suspect what was meant was that you delete the (spreadsheet) file.
Alpesh PatelAssistant ConsultantCommented:
Hey you can delete any of file using SSIS. (File System Task is there to satisfy your need)
whgsystemsAuthor Commented:
I tried everything suggested beforehand so no real solution but the answers where correct if somewhat short and lacking in examples
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.