[AccessD] SQL exporting to EXCEL

David Emerson davide at dalyn.co.nz
Tue Apr 8 14:10:11 CDT 2003


AXP ADP/SQL2K

(Already sent to SQL list but looking for wider coverage)

I have a sproc that returns a recordset I want to export to excel.  When I 
use the following code Excel wants to name the sheet the value of 
strSprocName.  This causes problems because the call to the sproc is not a 
valid sheet name (this is because of the second parameter - sprocs with 
only 1 parameter work ok).  The spreadsheet creates ok but when I open it 
in Excel and error appears saying that the sheet has been recovered and 
renamed.  I would like to be able to create the sheet without the error.

strSprocName = "EXEC spBookingExport 0, '20'
DoCmd.OutputTo acOutputStoredProcedure, strSprocName, acFormatXLS, 
C:\Temp\test.xls



Regards

David Emerson
DALYN Software Ltd
25b Cunliffe St, Johnsonville
Wellington, New Zealand
Ph/Fax (877) 456-1205  



More information about the AccessD mailing list