Export specific columns to excel

  • Hi,

    can anyone help me.

    i need to Export specific columns to excel and keep some existing fomulas in the target excel file.

    for example i have 2 columns in my sql server table Number1 and Number2

    in excel i have a sheet with 3 columns Number1, Number2 and a Calculation Column Number1+Number2

    no idea how to, i tried openrowset but is not working fine

    thanks

  • See if my article Automating Excel from SQL Server[/url] helps you out. Be sure to read the discussion on this article for implications of doing this on your production server.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

Viewing 2 posts - 1 through 1 (of 1 total)

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