Exporting SQL result to excel file with headers
<p>I am running a query on SQL Server to get result. The result contains four header columns (ext type, count, size, percentage).</p>

<p>I am using a command to get the SQL result into an Excel sheet. But I am not able to get headers in the Excel sheet.</p>

<pre><code>bcp "dbo.DumpFileStats" queryout DSFFileStats.csv -d DB_Name -U sa -P XXXXX -c -t"\",\"" -r"\"\n\"" -T
</code></pre>

<p>Is there something I am missing?</p>

<p>-Kalyan</p>