Linking to Excel

spock1971

Registered User.
Local time
Today, 18:15
Joined
Nov 14, 2004
Messages
80
I'm trying to link an excel s/sheet into a database, however the link wizard doesn't give me the option of setting field types (text, double etc). It's skipping that screen.

I've changed the s/sheet so that all cells are text but on linking the table sets 2 fields to number and I'm losing some textual data.

However if I copy the cells in excel, open a pre-built table with field types set and do paste append, all data is visible.

Therefore, I'm trying to see if there's a way in code I can get access to open a specific excel s/sheet, copy all, open database table and paste append.

Any Ideas?
 
Excel

Use the Docmd.TransferSpreadsheet command and then run an append query.
 
Cheers

Changed it to TransferSpreadsheet and it's working again.
 
Lied - replied to the wrong post.

If I use transferspreadsheet, even though all 4 columns in excel are text, access sets them to number and deletes those rows with text in.

Any other Ideas?
 

Users who are viewing this thread

Back
Top Bottom