05-03-04, 09:48 #1Registered User
- Join Date
- May 2004
Unanswered: Exporting a View from a project using the transferspreadsheet command
What I am trying to do is something that I have working in MS Access with Jet engine, but I cannot do the same with a project -using ADO-.
With DAO, I use a loop to create temporary queries -I delete them afterwards- that I use in a transferspreadsheet construct. The version of excel that I am using -acSpreadsheetTypeExcel8- is not recreating the workbook but it's actually appending new worksheets. At the end, I have one workbook with many worksheets.
When I try to do the same though a project (using ADO), the command works only with tables, but not with views. I've tried usng the OutputTo command but it recreates the workbook (i.e. only one worksheet)
What I want to do now -though code- is create the temporary table in the "tempdb", and then access "tempdb" and use the transferspreadsheet command to export my results.
Can you provide me with some sample code on how to access the tempdb database, since I am connected to another database and use the transferspreadsheet command to export the temporary tables?