I am creating a SSIS package that imporr data from a SQL Server Source
to an Excel Destination
.
How can one truncate spreadsheet before run?
I tried the following way (using Execute SQL Task
with no success.
Jet provider does not support neither truncate or delete command. You have 3 workarounds:
Drop Table TableCall_Log
and create a new one. You can referer to this Link for more details.Useful Links
Truncation is not supported. You can recreate the whole excel file using two tasks:
If you do not know the exact form of CREATE TABLE statement, then try to first prepare excel destination in a data flow task and by creating new excel sheet (by pushing New button on Connection Manager tab in Excel Destination editor) SSIS designer will show you CREATE TABLE statement which you need.
Connect the first task to the second task using Completion constraint if you are not sure, that the excel file exists every time you run the package.
You may also need to set DelayedValidation property to True on tasks following these first two tasks.