How to import Excel file to Access but the headings have spaces?

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

Guest

I need to import the spreadsheet file regularly to an existing table in
Access where the field names do not have spaces. But because the column
headings of the excel file have spaces the file can't be imported.
 
There are a couple of ways this can be done:
First Way
Create an import table that has the exact same field names as the column
headings in the Excel sheet, including the spaces. Do your import into that
table. You will need to delete all the data in the table before the import.
The create a query to append the data in the import table to your regular
table.

Second Way (My preferred)
Rather than import the Excel sheet, link to it. Then use an append query to
append the data to your Access table. Faster, simpler, and creates less
bloat.
 
Thx a lot, Klatuu. It works!

Klatuu said:
There are a couple of ways this can be done:
First Way
Create an import table that has the exact same field names as the column
headings in the Excel sheet, including the spaces. Do your import into that
table. You will need to delete all the data in the table before the import.
The create a query to append the data in the import table to your regular
table.

Second Way (My preferred)
Rather than import the Excel sheet, link to it. Then use an append query to
append the data to your Access table. Faster, simpler, and creates less
bloat.
 
Back
Top