Click here to Skip to main content
15,904,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table students that contains 100 Records.

Now i'm going to Run a Query
select * from Students

I Copy the Students Data and Paste it in My Excel File

After some Time i inserted another 100 Records now again i'm going to run the Query copy the Data and Paste it in Excel File


Every Time copied and Paste in Excel File.

Is there any Alternate way or Query that directly save the Data in my Excel File
Posted

1 solution

You could try the following link to answer your question

I hope it helps you.

http://blog.sqlauthority.com/2008/01/08/sql-server-2005-export-data-from-sql-server-2005-to-microsoft-excel-datasheet/[^]
 
Share this answer
 
Comments
Venkat Kumar chigulla 4-Sep-13 6:25am    
I'm Getting Error
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.

how to overcome this Error
Thomas ktg 4-Sep-13 6:31am    
please configure ad hoc distrubuted quries to true instead of false at SQL SERVER configuration
Thomas ktg 4-Sep-13 6:38am    
You can just follow the link where you can overcome this problem,
http://forums.asp.net/t/1736766.aspx/1
Venkat Kumar chigulla 4-Sep-13 6:40am    
I ran this Command even though i got the same error

EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO

Thomas ktg 4-Sep-13 7:19am    
If you still get this error then i would recommend you to install the driver available for this and check it again. If your OS is 64 bit the link to download the driver is here

http://www.microsoft.com/en-us/download/details.aspx?id=13255

and follow this link
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/33436d82-085c-43e4-b991-a2d0d701c8fc/linking-to-csv-files-on-64-bit-sql-server

It could be little tedious to make the workaround but it will be more helpful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900