save the stored procedure resultset to excel file with proper display in excel file

  • You could use SSIS to do this. You would want to do a Data Flow Task where your source query is the SP and your destination is the Excel file. Then you can schedule the Package in SQL Server Agent.

  • What kind of FORMATTING oyu are talking about ....is it like width of excel's column ??

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • Formatting here means resultset to be displayed in proper columns in excel sheet.

  • INSERT INTO OPENROWSET ('MICROSOFT.JET.OLEDB.4.0', 'Excel 8.0; Database=D:\RFPSent\SENT_RFPs.xls;HDR=NO;IMEX=2', 'select * from [Venue_RFPs$]'

    ) SELECT * from tblvenue_RFP

    ------------------------------------------

    In above text [Venue_RFPs$] is a worsheet which has same column as table tblvenue_RFP

    is you follow same sequence for both WORHSHEET and TABLE ..the data will be correctly migrated

    i hope you will get your solution 🙂

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • U can write a simple .NET windows application and call urs stored procedure and send the result set to excel

    This is very simple.

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

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