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.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-08-23 : 09:45:31
|
Anoop writes "Hi,I want to do read in a file containing a query and saving output in Excel file for reporting purposes.I have used OSQL but unable to save properly into excel so that that can be used as an report. it's not understandabel format.thanksAnoop" |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2006-08-23 : 18:27:55
|
You can do an export-to-Excel task in DTS that should do it. Or you can manually create the spreadsheet using an ActiveX task. Actually this might be better because you don't know at design time what the column names will be. I would create an ActiveX task that:1. reads in the query text2. executes the query and returns a recordset3. use the Excel API to export the recordset to Excel.HTH,Tim |
|
|
|
|
|