Importing CSV via wizard to Access table

jaryszek

Registered User.
Local time
Today, 09:06
Joined
Aug 25, 2016
Messages
756
Hi,

i am getting error while importing data from CSV:

The first row contains some data that can't be used for valid Access field names

Why is that?
I checked field Names and they are divided with double qoutes and Names are correct. Without any "_" or other special signs.

Can anybody help?
Jacek
 
Often CSV files will include empty columns that Access tries and fails to import. If so that error occurs.
You can instruct the wizard to skip unwanted columns.
Also, check whether the import includes all the required columns
 
they are divided with double qoutes
what do they look like in excel? for instance, are the values like:

header1 header2 header3

or is it like:

"header1" "header2" "header3"

??? it's not a big deal if u have to change the field names upon import anyway, is it?
 
Hi Jacek. After you get the error, does the import continue? If so, I think Access will replace the invalid field names. If so, you should be able to tell which columns Access was complaining about and examine them more closely. For example, see if they contain non-printable characters.
 
Can you open the file with notepad and copy and paste the header line here?

Access doesn't like names that start with spaces. These are sometimes hard to see since we use proportional fonts so spaces become very small.
 
Jacek
The screenshot below illustrates what I was referring to in post 2.

attachment.php


The csv file includes an empty 'field' triggered because I clicked in column D (deliberately in this case).
This confuses the import wizard causing the error you described and results in import errors as shown in the resulting Access table

Can you work out why the import wizard 'invented' the £3.00 value - it was 'trying to be helpful'

The solution in this case is to instruct the wizard to skip the unwanted Field4 in the import.
 

Attachments

  • Capture.PNG
    Capture.PNG
    39 KB · Views: 306
Last edited:
Hi Guys!!

Sorry for my late answer.

Thank you very much for your explanations and help!
I tried once again. Colin explanation helped the most.

Best Wishes,
Jacek
 
Hi Jacek. Congratulations! Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom