Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, dear SQL and programming gurus!
I have got one problem, and I think you cand help me. There is computer with SQL Server and a SQL DB. There are some tests running in our lab and during the test data through some hardware is stored in a SQL DataBase. The problem is that we can get the data by using some tools of Excel, but it is not so good, because we need data each 30-45 seconds, is there any tool, which can automatically import data to excel from sql? Or is there any other possibility to do this?
Please help me to do this.
Posted

You can refer the below link It will be useful for you,
http://www.likeoffice.com/28057/Excel-2007-Importing-data[^]

If you want your custom tool you can write it using a simple windows form(.net).

:)
 
Share this answer
 
Comments
jamshedhkl 17-Jul-12 7:33am    
Thank you for your reply, but I know this type of importing, you must do it manually, but I want something automatically. Unfortunately I don't know .NET, for this I wrote for help...
Hi,

You can do so by developing Windows Service or Some costume application.

but if you want a good solution then :

just write those query's which result you need sequentially

then save it in a SQL file

sqlcmd -S CAFRFD1LITPMA02 -i SQL FileName -o OutPutFileName [CSV | TXT ] -s

run this code in a Schedule, if you need individual files One by one then just change output file name Uniquely.

For that just add Date Time with file name using Commend Prompt

you can save this hole as Batch file and run it under Scheduler.

Commend Prompt Details Click Here[^]
Or Here[^]

For More Help Reffer : http://social.msdn.microsoft.com/Forums/en/transactsql/thread/b3f406e1-1b2e-4ee4-8d28-4470c0ea19f9[^]
 
Share this answer
 
v2
What you can do is , create a stored proc and inside that write logic to export data to excel using openrowset. you can find some solutions about this in this link.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926[^]

You can schedule a job for this sql proc and run periodically at the time interval you want.

hope this would give you an idea to take forward.
 
Share this answer
 
Sirs, I don't know anything about programming( Please if it is posssible can you say me conctrete steps...
I also found this one Database to Excel Spreadsheet[^] but I cannot use it I dont know how. The folder where my DB stored is C:\Dokumente und Einstellungen\gast731\Eigene Dateien\Eigene Datenquellen\WS0451_SQLEXPRESS master STUEP_ZYLINDER_TREND.odc how can I do it?
 
Share this answer
 
v2
Comments
Suvabrata Roy 17-Jul-12 8:53am    
Hi,
Do you know how to Write SQL Query ?
Other wise above solutions is not useful for you and if you know then you can use the above solution as well as mine...
:)
jamshedhkl 17-Jul-12 14:37pm    
No I don't know that one, but there is an executable application, how can I use that?

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