question

NageshPrasad avatar image
NageshPrasad asked

How to export query result set to Excel Sheet with Format (Border Size, Font Size etc..)

How to export query result set to Excel Sheet with Format (Border Size, Font Size etc..). Whether we can user BCP command to export result set with Format?
export
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
sqlaj 1 avatar image
sqlaj 1 answered
I don't know the BCP commands but here is a link if you have not seen this already. http://technet.microsoft.com/en-us/library/ms162802.aspx I recommend using PowerShell to export your results to Excel. It can be a little complicated if you are new to PowerShell but there are a few examples out there you may be able to modify for your situation. Here are a few. http://blogs.technet.com/b/heyscriptingguy/archive/2011/07/21/use-a-powershell-module-to-easily-export-excel-data-to-csv.aspx http://sethusrinivasan.com/2012/04/06/export-the-query-to-excel-sheet-automatically/ http://blogs.technet.com/b/joshs_sql_blog/archive/2013/03/19/exportsqlquerytoexcel.aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.