TSQL export to Excel (.xlsx)

asked 2021-11-22T15:58:27.06+00:00
SSinhg 246 Reputation points

Hi,

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.

No comments
{count} votes

Accepted answer
  1. answered 2021-11-22T16:40:19.253+00:00
    Michael Taylor 37,456 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