We help IT Professionals succeed at work.

Sql to Excel

I want to fetch 300 columns data to excel, sheet , it is not working , can you suggest  me a simple way to do that ,

it is like a table has 300 columns , and i want to transfer data for all the columns to Excel sheet , can you please suggest that .
Watch Question

Principal Analyst
Assuming you have a version of Excel newer than 2003, you should be able to 'pull' it from Excel with 'Data/Data from OtherSources/SQL Server' by choosing your SQL Server and selecting the table or view you want the data from.

Hi BeyondBGCM,

This is the very simplest method,but in different way.

1- First write the sql query in SQL Server Management Studio to fetch your required data.
2- select "Copy with Headers" in the results by right clicking on results.
3- Copy the data to excel.

Please check the attached screen shot.

Copy With Headers


yes, you are correct , but it takes time , more than 30 minutes , to fetch 28000 rows .... and still not diaplaying


but above is manual method , and will require lot of time ..... the excel connection with sql is better, but this too is taking lot of time , more than 30 minutes  now .....

HI BeyondBGCM,

Yes, It will take time for downloading the number of records. (Number columns +  Number of rows).
In your case number of column is 300 and row is around 28000
Vitor MontalvãoIT Engineer
Distinguished Expert 2017

How are you performing that operation?
In SSMS you can use the Export Data wizard by right-clicking on the desired database name then chose Tasks / Export Data...