How to Overwrite an Excel sheet using SSIS or How to Delete data Before Inserting into Excel Sheet
-
Friday, August 03, 2012 12:01 PM
Hi all,
i facing a problem with Excel Sheet, when i running SSIS package at that time it appending the data to already existing data .but i want to overwrite the data or delete the data and reinsert the data into excel sheet.
and i tried Drop table Excelsheet; and agian using another execute sql task creating Excelsheet but it not working :( .
so please share your answer here .
thank u all :)
- Changed Type Santosh.pandyala Thursday, August 09, 2012 7:03 AM
All Replies
-
Friday, August 03, 2012 12:05 PMModerator
easiest is to create an empty template and use that to replace (File System Task) the destination file before the data flow task starts
Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
- Edited by SSISJoostMicrosoft Community Contributor, Moderator Friday, August 03, 2012 12:06 PM
- Proposed As Answer by DotNetMonster Friday, August 03, 2012 1:16 PM
- Unproposed As Answer by Santosh.pandyala Thursday, August 09, 2012 7:02 AM
- Proposed As Answer by Karthik Elangovan Friday, August 24, 2012 5:55 PM
-
Friday, August 03, 2012 12:44 PMFollow this which discusses a similar problem. In a nnutshell SSIS cannot simply overwrite the excel but the same can be achieved via a bit of manipulation. As SSISJoost mentioned use an empty template to replace the destination before you start pumping in the new data.
http://btsbee.wordpress.com/
-
Tuesday, August 07, 2012 4:35 AM
hi btsbee,
i gone through the above discussion but i was not able to understand that one can u please explain me .
thanks .
-
Sunday, August 12, 2012 4:02 AMModerator
Hi Santosh.pandyala,
Unfortunately the Excel connection manager does not have a setting that allows overwriting the data. You'll need to set up some file manipulation using the File System Task in the Control Flow, please see detail steps in the following link:
http://samuelhaddad.com/2009/03/31/overwriting-an-excel-file-destination-using-ssis/
You can also refer to Rafael Salas's reply in the simlar thread:
http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/9c21b7ee-5737-469d-8b96-62e0cad41616
Thanks,
Eileen- Marked As Answer by Eileen ZhaoMicrosoft Contingent Staff, Moderator Thursday, August 23, 2012 2:29 PM
-
Monday, August 13, 2012 10:42 AM
This is the link which can be helpful for you
http://dwhanalytics.wordpress.com/2011/04/07/ssis-dynamically-generate-excel-tablesheet/
-
Monday, August 13, 2012 1:29 PM
Hi Santhosh,
You can used the below mentioned Steps to perform the deletion in Excel:
1. Add and Execute SQL task to your Package, in that task configure the connection properties as mentioned below:
Note: You need to add your excel files connection manager name to your Execute SQL task Connection type
Attached the screenshot for your reference.
Ramasubramanian S
- Proposed As Answer by Ramasubramanian. S (Partner) Monday, August 13, 2012 2:31 PM
-
Tuesday, August 28, 2012 9:33 AM
i was unable to see the screen shot ,can u share the screen to my mail id santosh.pandyala@gmail.com
-
Tuesday, August 28, 2012 2:09 PM
Hi,
I am attaching the screenshot again,
Ramasubramanian S
-
Tuesday, August 28, 2012 3:12 PM
hi ,
thanks for sharing screen shot but this one is not working ...
try once let me know is it working or not ??
-
Tuesday, August 28, 2012 5:21 PM
HI,
did you add your Data flow task after this Execute execute task, if so brief wha tare the actions you have taken.
Ramasubramanian S

