Export data to Excel

  • Hi,

    Any of you know how to export a result set to excel format or to CSV format?

    This is because in the query analizer exists a way to generate an output file and also define its format.

    Any help or advice would be wonderful.

  • Randall,

    So do you already know that Query Analyzer can do this?  Click Tools | Options | Results tab, and then set the "Results output format."

    If you want to do this programatically, using DTS would be the easiest way to go, in my opinion.

    Cheers,

    Chris

  • Well Chris,

    Not that easy, look I have a app develop in Clarion and I am using SQL as Database. The development tool does not offers me and easy way to export data from one format to another, so thats way I looking for and alternative in SQL. What I want to is to call and sp that do the job for in the backend.

  • In that case you could create a DTS job and then use your sp to launch it.  For example, you could add DTS to the SQL Server Agent (without giving it any schedule) and use sp_start_job to run it whenever you need it to run.

    -Chris

Viewing 4 posts - 1 through 3 (of 3 total)

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