Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export to excel from SQL Server 2000 using Query Analyzer code

What's the easiest way to export data to excel from SQL Server 2000.

I want to do this from commands I can type into query analyzer.

I want the column names to appear in row 1.

like image 602
cindi Avatar asked Jun 30 '26 16:06

cindi


1 Answers

In Query Analyzer, go to the Tools -> Options menu. On the Results tab, choose to send your output to a CSV file and select the "Print column headers" option. The CSV will open in Excel and you can then save it as a .XLS/.XLSX

alt text

like image 81
Joe Stefanelli Avatar answered Jul 03 '26 07:07

Joe Stefanelli