title: Exporting SQL results in Excel format
body: <blockquote>
    <p>exec master..xp_cmdshell'bcp "select * from [db name].[table name]"
    queryout D:\testing1.xls -o "D:\querycommanddetails.txt" -T -c -C RAW'</p>
  </blockquote>
  
  <p>I'm running above query on my local machine but System is showing output as 'NULL'.Can anybody help?</p>