How do i -> place the output of 'Execute SQL Task' into Excel/HTML file , and mail them

  • Hi All,

    I have a requirement where i need to execute a query (daily) ,and put its output into Excel or HTML file before sending it as a mail . Can anyone let me know how can i achieve this?

    Thanks,

    Arunvijay

  • aveerabadran (10/23/2008)


    Hi All,

    I have a requirement where i need to execute a query (daily) ,and put its output into Excel or HTML file before sending it as a mail . Can anyone let me know how can i achieve this?

    Thanks,

    Arunvijay

    Why do you export data from sql to Excel.

    you should create an excel file with the template you required:

    and by using the option "Import External Data" from the Tools menu, select the data source SQL and supply the query, you will get the resulted dataset at the position in excel sheet where you want without creating the same sheet again and again.

    next time you only have to copy and paste the excel workbook and change the sql query

    kshitij kumar
    kshitij@krayknot.com
    www.krayknot.com

  • i got a link which satisfies my requirement :

    http://www.sqlservercentral.com/articles/SSIS/62678/

    (As per the forum) the "Get Daily Totals" (execute sql task) works perfectly , but i have problems in "Test output to HTML file" (XML Task).

    It fails with the error message :

    "[XML Task] Error: An error occurred with the following error message: "XSLT compile error.". "

    Can anyone tel what this error means. I was not able to find sites where i can find more abt this.

    Thanks,

    Arunvijay

  • aveerabadran (10/23/2008)


    Hi All,

    I have a requirement where i need to execute a query (daily) ,and put its output into Excel or HTML file before sending it as a mail . Can anyone let me know how can i achieve this?

    Thanks,

    Arunvijay

    Refer http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926


    Madhivanan

    Failing to plan is Planning to fail

  • did you get it resolved?

  • Virendra Chauhan (1/15/2015)


    did you get it resolved?

    I hope so. If it's still on the "to do" list after six years then the client would be getting a bit twitchy :ermm:

Viewing 6 posts - 1 through 5 (of 5 total)

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