Determining data type of imported data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working with an Access application that requires importing Excel Data
into an exisiting table. The new data overwrites the old data each time, but
for the application to work it has to use that existing table with columns
with data types, Text, Date, Number. Sometimes the data from excel imports as
Number in the first column even if it is formatted as general or text. Is
there a work around for this, or is there a way for the app to compare the
two datatypes and switch the type if it is incorrect.
 
I am working with an Access application that requires importing Excel Data
into an exisiting table. The new data overwrites the old data each time, but
for the application to work it has to use that existing table with columns
with data types, Text, Date, Number. Sometimes the data from excel imports as
Number in the first column even if it is formatted as general or text. Is
there a work around for this, or is there a way for the app to compare the
two datatypes and switch the type if it is incorrect.

Two suggestions:

- Don't directly Import the spreadsheet; instead, link to it, and run
an Append query loading your (correctly datatyped) Access table.

- If necessary, put a dummy row at the top of the spreadsheet with an
unambiguous text field ('X for example) above each such column.

John W. Vinson[MVP]
 
Back
Top