From: Boon on
Hello,

I have vba that will import the data from Excel file. Is it possible to
append the data from excel file to a table in Access in such a way that
excel file does not have a field's name? When I run this transferspreadsheet
command, it comes in as F1, F2,.....

thanks,


From: Piet Linden on
On Mar 3, 3:08 pm, "Boon" <boonyawat.la-ongth...(a)cnh.com> wrote:
> Hello,
>
> I have vba that will import the data from Excel file. Is it possible to
> append the data from excel file to a table in Access in such a way that
> excel file does not have a field's name? When I run this transferspreadsheet
> command, it comes in as F1, F2,.....
>
> thanks,

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"MyTable", "C:\MyFile.xls", True

Note the TRUE... that means "tell Access that the first row is column
headings, so don't import that.... you must have it set to false.
From: golfinray on
Put the field names in the first row of the spreadsheet. Then on the
transferspreadsheetmethod, you can tell Access where to start linking or
importing. Like this:DoCmd.TransferSpreadsheet acLink, , "0709 payment
tracking", "P:\fileshare\milton 0709 disbursement", True, "sheet1!a2:s595"
--
Milton Purdy
ACCESS
State of Arkansas


"Boon" wrote:

> Hello,
>
> I have vba that will import the data from Excel file. Is it possible to
> append the data from excel file to a table in Access in such a way that
> excel file does not have a field's name? When I run this transferspreadsheet
> command, it comes in as F1, F2,.....
>
> thanks,
>
>
> .
>
 | 
Pages: 1
Prev: Windows 7
Next: Ensure correct date sequence