Exporting ACCESS Stored Procs into Excel

  • Thread starter Thread starter Rob Wills
  • Start date Start date
R

Rob Wills

Hi,

I have created a "Parameterized Stored Procedure" in Access 2007 using the
following ADODB command

Conn.Execute "CREATE PROCEDURE uspBalance_Summary_Rec1 (@Owner Text(50)) AS
......"

I wish to export data from the database into a spreadsheet based on the
owner specified in the code.

I have tried Transferspreadsheet - that doesn't work and have been looking
at OutputTo

DoCmd.OutputTo acOutputStoredProcedure, "uspBalance_Summary_Rec1 ""Fred""",
acformatxls, "c:\Temp\Fred.xls"

This doesn't appear to work either...

Any ideas?

Thanks
Rob
 
Hi Pieter,

Yes I was aware of that methodology - and have used it before in Excel.
However I am wanting to push from Access into Excel

Using your method would mean writing code in Access to open an Excel app -
to pull the data in from Access - seems slightly perverse?!
 
In fact - I've decided it's easier to create a query that uses a "control"
table that I can populate with my parameters....
 
Back
Top