locked
Is It Possible To Use SQL Server To Add A Header Row To Existing Excel Spreadsheets? RRS feed

  • Question

  • Hello Forum

    We have a process here that produces several dozen Excel Spreadsheets every day from SQL Server using the bcp utility.  the problem is that we cannot include the column headers when producing the Output.  We are therefore trying to find a method where we can append the column Headers to the Spreadsheets; is there a way of doing this?

    Many thanks


    Please click "Mark As Answer" if my post helped. Tony C.

    Thursday, June 4, 2015 3:15 PM

Answers

  • Have you seen this as a way to add headers to the bcp output?

    http://stackoverflow.com/questions/1355876/export-table-to-file-with-column-headers-column-names-using-the-bcp-utility-an

    You could also migrate to using SSIS, that will let you include headers. If you do this then I really really recommend spending a day or so learning BIML and doing it in that as even a week learning BIML will pay back pretty quickly.

    Friday, June 5, 2015 8:19 AM

All replies