Access 97 export to Excel 2000 problem (1 Viewer)

rwttm001

New member
Local time
Today, 22:25
Joined
Nov 20, 2002
Messages
7
Hi all - hope you can help

Using the code:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "tblTrade", "C:\internal.xls", True

I wish to export all data from tblTrade in Access 97 to Excel 2000, but I am geting the following error:

Table 'tblTrade' already exists. (Error 3010)

Any help would be greatly appreciated!

Cheers
MWR
 

BenSteckler

Addicted to Programming
Local time
Today, 22:25
Joined
Oct 4, 2000
Messages
44
Hi rwttm001,

If you change your docmd line to acSpreadsheetTypeExcel9 instead of acSpreadsheetTypeExcel97, it should work just fine.

The only time you will have a problem is if the spreadsheet is already open by another user, our yourself.

Thanks
BDS
 

rwttm001

New member
Local time
Today, 22:25
Joined
Nov 20, 2002
Messages
7
Ben

It did'nt work when I changed the line as you suggested, but the fact that the line won't work if the file is already open did! Now exports information perfectly!

Is there a way to structure the data as it goes into excel or would I be better manipulating it once in excel?

Cheers

Matt
 

BenSteckler

Addicted to Programming
Local time
Today, 22:25
Joined
Oct 4, 2000
Messages
44
I know it is possible, but I am unsure how. I would just go ahead and manipulate it in Excel.

Good luck.
BDS
 

Users who are viewing this thread

Top Bottom