Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting Data to an Excel File
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00509145
Message ID:
00509947
Views:
23
>Thanks for the suggestions.
>
>But my point is, How could I program it (Exporting data into Excel)
>in a stored procedure with two parameters:
>
> 1. Source data (from a view or table)
> 2. Destination (Excel file (ex. C:\mydata.xls)

You could use the extended stored procedures in SQL Server sp_OA... to create an object reference to DTS and execute it using your parameters. Use the OA SPs to automate the creation of a package and the associated steps and tasks. That would the only way I know of to do it in SQL Server.

And yes the OLE Automation SPs are in SQL Server 7. Take a look at the BOL for more information.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform