change excel spreadsheet before importing

  • Thread starter Thread starter Clemens
  • Start date Start date
C

Clemens

Hi,

I don't know if it is possible but i hope it will.

I perform each week an import from an excel sheet. One of the fields has a
fieldname with a dot (like main.window). When importing excelsheet into
access it fails because of this fieldname. I can change the fieldname in
excel before importing, but I will cost me extra time.
Is there a possibility from access using a code to change the fieldname of
an import sheet before importing?

Sorry for poor english, so if more explaination is needed just ask.

I hope if you can help me out
 
I was thinking a bit further....

The import from excel to access is done with the selection 'First Row
Contains Column Heading' on.

I use the following code:

DoCmd.RunSQL "DELETE * FROM SCexport2"
DoCmd.TransferSpreadsheet acImport, , "SCexport2",
..SelectedItems.Item(1), True

So if it is possible to change the code to import the spreadsheet without
the first row, I do not need to change fieldnames.
 
Back
Top