none
Problem in exporting EXCEL with BOLD and coloured header by SSIS

    Question

  • I'm having this problem to export in excel by SSIS.

    I have a SP fetching data from database and put that in excel.

    Now, I want the first row of the excel as bold and coloured. And this excel needs to be sent daily with refreshed data everyday(though that's not a prboblem).

    I have a file system task to delete the previous day's excel.

    Then a execute SQL task to create a new excel sheet.

    then dataflow and send mail .I have tried to copy from a templet but that's not working as we need to refresh data.

    Any solution from any body??

     

    Friday, June 24, 2011 1:45 PM

Answers

  • You can add a script task that will operate on the Excel spreadsheet after it had been filled with data to make the necessary formatting.

    This code will incorporate some Office interop techniques in VB youdo

    Imports Microsoft.Office.Interop.Excel
    

    and then the Script Task:

    like in this thread: http://stackoverflow.com/questions/1954582/ssis-2008-excel-2007-formatting-excel-columns-properly-exporting-not-importing


    Arthur My Blog
    By: TwitterButtons.com
    Friday, June 24, 2011 2:03 PM
    Moderator
  • Another option is mentioned in this MSDN thread:

    http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/8f9a0499-d552-45f4-a121-f8224b252111


    Arthur My Blog
    By: TwitterButtons.com
    Friday, June 24, 2011 2:04 PM
    Moderator

All replies

  • You can add a script task that will operate on the Excel spreadsheet after it had been filled with data to make the necessary formatting.

    This code will incorporate some Office interop techniques in VB youdo

    Imports Microsoft.Office.Interop.Excel
    

    and then the Script Task:

    like in this thread: http://stackoverflow.com/questions/1954582/ssis-2008-excel-2007-formatting-excel-columns-properly-exporting-not-importing


    Arthur My Blog
    By: TwitterButtons.com
    Friday, June 24, 2011 2:03 PM
    Moderator
  • Another option is mentioned in this MSDN thread:

    http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/8f9a0499-d552-45f4-a121-f8224b252111


    Arthur My Blog
    By: TwitterButtons.com
    Friday, June 24, 2011 2:04 PM
    Moderator