overwrite excel file when exporting from SSIS rather than appending

Problem: Want to overwrite excel file when exporting from SSIS rather than appending.

Solution:

Set up 2 SQL Tasks.

SQL Task 1: Connection Type Excel, set your connection and SQL Statement = drop table Excel_Destination
SQL Task 2: Connection Type Excel, set your connection and SQL Statement = CREATE TABLE `Excel Destination` (`id` Long) – copy the create table script from data flow task, excel destination, new excel sheet – the code will be created for you

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: