delete excel header row using SSIS RRS feed

  • Question

  • hello,

    i just want to ask if it is possible to delete a header row of excel using ssis. 

    i'm currently exporting records from sql server to ms excel using dynamic filename. however, i cannot delete the header row every time i generate excel file. i've already change the HDR property to NO. but the result is also the same. i suspect that the header row is being created every time it passes through the destination excel since i create table and fields from there. 

    this is my first time using ssis. i hope someone can help me with this problem.

    and thank you in advance, for any help you can give
    Saturday, February 13, 2010 5:18 AM

All replies

  • Hi,

    Based on my test, when we create a new sheet in EXCEL Destination, the columns' name will be created automatically. So in this scenario, I suggest you use a Script Task to delete the first row of the EXCEL programmatically.

    Please refer to the following link.

    How to delete first row from an Excel Sheet using C#.Net:


    Please feel free to let me know if I’ve misunderstood anything.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Proposed as answer by johnwelch Monday, February 15, 2010 7:44 PM
    Monday, February 15, 2010 5:18 AM
  • Hi Zongqing Li,

    In using script task, is it require for us to install ms excel and .net environment?

    I was suppose to run the package in a db server, but it doesn't have any ms office install in it. I've tried using other alternatives like creating a VB script to delete the header. It works fine in my workstation, but when I transfered it in the server, it didn't work out. The script requires to open the application in an excel environment. and since it doesn't have an excel, it returns error message: Active X component can't create object: 'Excel.Application' Code: 800A01AD. Currently, we're looking for other alternatives aside from creating a script that will require installation of ms office and .net environment.

    any advice you can give?

    Thank you very much for the immediate reply.

    Tuesday, February 16, 2010 1:49 AM