Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Need TSQL code on how to write to a text/excel file?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-05-16 : 08:17:53
Krisnasamy writes "Hi There,

I'm looking TSQL codes which could do the following task in order:

1. Run a select command from a table
2. Copy the results in a temp table
3. Run select against the temp table and store the results into an execl spread sheet(with multiple worksheets in it)
4. The excel file should be create on the fly with a specified naming convention: filename-mm/dd/yyyy

Hope you could help on this!

Thanks alot.

Rgds,
Krisnasamy"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-05-17 : 06:21:59
That's a bit like asking a bicycle to act as a mechanical digger....possible but not practical.
Why can you not use the most appropriate tools to do this??? use T-SQL to get your data, and then return it to some app...vb/excel-vba/asp/java....which can manipulate excel objects via OLE.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-17 : 07:26:52
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -