i have to import an excel file into an access data base. the excel file does
not have a header. how can i add a header with column headings of 'col mod
rate 1 rate 2 ' before importing to the access file.
thanks for your help
You'd have to use Automation to open an instance of Excel, load the
workbook, insert a row into the worksheet and populate the cells as
appropriate.
Another option would be to import it as-is, then rename the fields in the
resulting Access table.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>i have to import an excel file into an access data base. the excel file
>does
[quoted text clipped - 3 lines]
>
> thanks for your help
jnewl - 23 Oct 2007 14:06 GMT
how would i rename the fields in vb code?
thanks
> You'd have to use Automation to open an instance of Excel, load the
> workbook, insert a row into the worksheet and populate the cells as
[quoted text clipped - 10 lines]
> >
> > thanks for your help
Douglas J. Steele - 23 Oct 2007 14:29 GMT
CurrentDb.TableDefs("NameOfTable").Fields("OldName").Name = "NewName"

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> how would i rename the fields in vb code?
> thanks
[quoted text clipped - 13 lines]
>> >
>> > thanks for your help
jnewl - 23 Oct 2007 14:52 GMT
thanks much
> CurrentDb.TableDefs("NameOfTable").Fields("OldName").Name = "NewName"
>
[quoted text clipped - 15 lines]
> >> >
> >> > thanks for your help