Importing Excel Spreadsheet into Access

W

Westeral

I am able to export a table to an Excel Spreadsheet using the
transferSpreadsheet command. This application has to generate this
spreadsheet monthly to send to a central location with an identical database
where it will need to be imported from several locations in the state and
compiled for various statewide reports and statistics. I was testing the
import of the same spreadsheet I had just generated and received the error
message saying "Field 'F1' doesn't exist in destination table
"tblCaseReviews". Since this is a spreadsheet generated from this same table
it doesn't make sense to me. Am I missing something? F1 cell is just the
column heading on the spread sheet that is identical to the field name in the
Access table.
 
D

Douglas J. Steele

Have you got the field names as the first row of the spreadsheet? Did you
tell Access that?

If not, then Access has no way of knowing the mapping between the columns in
your spreadsheet and the fields in the table.
 
D

Douglas J. Steele

Have you got the field names as the first row of the spreadsheet? Did you
tell Access that?

If not, then Access has no way of knowing the mapping between the columns in
your spreadsheet and the fields in the table.
 
W

Westeral

The field names are the first row of the spreadsheet. I did not tell Access
that as I am new to exporting/importing and don't know how to tell Access
that. I did try deleting the first row of the spreadsheet however and still
got that error. There is data (and field names in all the top row cells
(from A1) so why did it give the error for F1, the sixth column and not the
first. I looked at the formating of the spreadsheet and they are all
"general".
 
W

Westeral

The field names are the first row of the spreadsheet. I did not tell Access
that as I am new to exporting/importing and don't know how to tell Access
that. I did try deleting the first row of the spreadsheet however and still
got that error. There is data (and field names in all the top row cells
(from A1) so why did it give the error for F1, the sixth column and not the
first. I looked at the formating of the spreadsheet and they are all
"general".
 
W

Westeral

Problem solved. I missed the Hasfieldnames argument in the method when I read
it. Adding that solved the problem. I appreciate your assistance.
 
W

Westeral

Problem solved. I missed the Hasfieldnames argument in the method when I read
it. Adding that solved the problem. I appreciate your assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top