Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Excel to Access problems

Status
Not open for further replies.

rkw99

Programmer
Jun 12, 2002
3
GB
I wonder if you can help with my Access/Excel query.

I have a spreadsheet that I am importing into Access using the following line:

DoCmd.TransferSpreadsheet acImport, 8, "raw_data", "c:\file.xls", False, ""

This works fine on my PC and all fields are of type text. But when it is run on someone else's PC (both using Excel and Access 2000) I get the types of the fields being the type of data in the first row of the spreadsheet, which isn't what I want and is not representative of the type of data in that column.

Do you know why there is a difference? and do you know how I can import this file making sure all fields are of type text?

Any ideas would be much appreciated.
 
Are you also on 2000 ?
If not, there are probably different bits of code working in the background to create the import.
Suggest you create an import spec which specifies the field data types - it's much safer to do this anyway
HTH
Geoff
 
Can you use a spec to import a spreadsheet?

Ideally that is what I would want to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top