SQL Server Performance

Export to Excel

Discussion in 'T-SQL Performance Tuning for Developers' started by Madhivanan, May 13, 2005.

  1. Madhivanan Moderator

    I used bcp to export data to Excel file
    master..xp_cmdshell 'bcp "select * from MyDB..Test" queryout "D:ex.xls" -c'
    It is working. But It is actually stored as Text(Tab Delimitated) type. I have to open it and do saveas and select "Microsoft Excel Workbook" to actually save it as Excel file. Is there any way to avoid this?


    Failing to plan is Planning to fail
  2. satya Moderator

Share This Page