TSQL export to Excel (.xlsx)

SSinhg 286 Reputation points


Using tSQl is it possible to export to .xlsx format (Excel)... I'm looking to export from a table or view.

I have googled and read a few blogs on similar lines but they seam to work for .xls format only...

Any help or pointers will be highly appreciated.

A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,515 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 43,971 Reputation points

    Not directly in T-SQL. Normally export is handled using SSIS or similar tool.

    XSLX follows the Office OpenXML specification and ultimately is a ZIP file. T-SQL can generate text files but it isn't going to be able to generate an OpenXML document.

0 additional answers

Sort by: Most helpful