docmd.Transferspreadsheet acExport don't work in Access 2007

hardrock

Registered User.
Local time
Today, 17:39
Joined
Apr 5, 2007
Messages
166
Hi all,

I cant export my table to a spreadsheet using Access 2007, yet it works fine in Access 2003.Heres the code:

DoCmd.TransferSpreadsheet acExport, 6, "tb_parts","C:\out.xls", false

I've read that transferspreadsheet does not work with Access 2007? Is there a workaround as i can't find a definite example of exporting a table to excel in ver 2007.

Thanks!
 
If you are just exporting the table with no fancy business, you could use File/Export and save as type .xls
 
funny that

i was looking at an A2000 installation yesterday that didnt have any save as xls options etc

could this be an installation issue maybe - you didnt install all the avaialble filters etc?

thats what i thought it might be (although it will import xls files)
 
DoCmd.Transferspreadsheet should work just fine in 2007 (it is the Export of REPORTS to Excel that went away).

Try this:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Table/Query Name Here", "FileNameHere"
 
thats why it wasnt showing up then, bob

how do I export a report, then if there's not save as facility - do i have to provide a way to export the underlying query?
 
In Access '07, I use ....
Code:
DoCmd.OutputTo acQuery, sDocName, acFormatXLS
... to do an export in Excel format. It will prompt for a place to save it - but it is nothing pretty to look at.

For the prettier stuff, I used preformatted spreadsheets in a templates directory and pump it out into an output directory by making use of the function found here. This works in '03 and '07 versions.

-dK
 
its not that, its the irritation of having to spend time programming something they used to be able to do themselves.
 

Users who are viewing this thread

Back
Top Bottom