[dba-SQLServer]Sprocs to Excel

Pain, T. (Tim) Tim.Pain at e20.akzonobel.com
Tue Apr 29 08:20:26 CDT 2003


The following code will output a sproc to an Excel sheet, but does not
seem to allow for the use of input parameters to the sproc. (watch for
line wrap)
DoCmd.OutputTo acOutputStoredProcedure, "usp_RptProductList",
acFormatXLS, "ProductList.xls", True

If you use -
DoCmd.OutputTo acOutputReport, "ProductList", acFormatXLS,
"ProductList.xls", True
You can pass the sproc input parameters via the input parameters of the
report, but creating a report just to pass parameters, seems to be a
waste of time when I don't actually need the report.

Any ideas on how I can pass parameters to a sproc and get the sproc
output to an Excel sheet would be greatly appreciated.

Many thanks
Tim Pain
<MailTo:Tim.Pain at AkzoNobel.com>





More information about the dba-SQLServer mailing list