Hi Diego,
You can't use SP with parameters. You can create a temporary view with Sql statment and send it to Excel spreadshet. View this thred ---- http://www.google.it/groups?threadm=eL4EA8%23WFHA.1404[ at ]TK2MSFTNGP09.phx.gbl ----
p.s. mi sembra di capire che parli Italiano, se vuoi posso spiegarti meglio nel newsgroup microsoft.public.it.office.access L'Inglese non è il mio forte :-)
Ciao -- Giorgio Rancati [Office Access MVP]
"Diego" <diego.lotti[ at ]nospamiol.it> ha scritto nel messaggio news:eGhRWsY9FHA.220[ at ]TK2MSFTNGP14.phx.gbl...
[Quoted Text] > Hi, > > i experience this problem: > > I have an SP called Test which expect a date range, so the string to call > the sp is: stSP="EXEC Test '01/01/05','31/12/05'", for example. > > I want to export the resultset to excel using: > > DoCmd.OutputTo acOutputStoredProcedure , stSP, acFormatXLS,
"c:\prova.xls", > 1 > > everyting works, but excel tries to use the name of the SP (stSP) as the > name of the worksheet. But a string with the char (') is not a correct name > ad so when I open the report i get errors on the file name. > > > Is there a way to solve this? Why can't I specify the name for the sheet? If > I can't use SP with parameters, where is the point of giving this feature? > > Thank you very much > >
|