Excel destination overwritten

  • Hi,

    I need to regularly dump the data to excel file .xls from OLEDB data source and when i tried to do it in excel destination,its appending the data to last result set in excel.

    How to overwrite the existing file or delete the records before we put the latest execution result set.

    Any references will be helpful.

    Thanks,

    Gangadhara

  • I do not think you can delete Excel data using an OLE DB connection but I read you can use the DROP TABLE followed by CREATE TABLE syntax to accomplish a similar result. I have not tried it though.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • opc.three (6/5/2012)


    I do not think you can delete Excel data using an OLE DB connection but I read you can use the DROP TABLE followed by CREATE TABLE syntax to accomplish a similar result. I have not tried it though.

    I read that too - must try it one day.

    Another solution is to keep a 'template' spreadsheet somewhere (contains headings but no data) and then have an initial File System Task (or Script Task) in your package which copies this over the top of your 'current' spreadsheet before you send any data to it.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Drop table deletes only the column headings not the data.

    I didn't find a way to delete the data from Excel. In my work, I copied the excel with a new name dynamically and loading the data into new file.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply