bcap wrote:
> To all:
>
> I need to create a Stored Procedure that will take a query and export
> it to Excel. I also need the Excel file to have a timestamp making
> each file unique upon creation.
>
> I have attempted to use the bcp utility, however you cannot export to
> Excel using this method.
So export to a csv or txt file either of which can be opened in Excel.
> I have attempted an OPENROWSET, however this method requires having a
> file existing.
>
> I would sincerely appreciate any suggestions, links, or example on how
> to be able to export to Excel with DTS/SISS in an SPROC that would
> allow creating the Excel on the fly.
>
Create a package that does your export
http://www.google.com/search?q=ssis+export+to+excel+create+file+dynamic+name
and execute the package from your stored procedure
http://www.google.com/search?q=execute+ssis+package+from+stored+procedure