choose first row as heading

  • Thread starter Thread starter thread
  • Start date Start date
T

thread

hi all,
does anyone know how can i choose first row as header when importing
excel file to access via vba?
 
Open an Access module. Select HELP. Look for syntax on the
TransferSpreadsheet method. Included is the following:

hasfieldnames Use True (-1) to use the first row of the spreadsheet as
field names when importing or linking. Use False (0) to treat the first row
of the spreadsheet as normal data. If you leave this argument blank, the
default (False) is assumed.
When you export Microsoft Access table or select query data to a
spreadsheet, the field names are inserted into the first row of the
spreadsheet no matter what you enter for this argument.


--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
Do a manual import & save the import spec
Use the Import spec in subsequent imports

HTH

Pieter
 

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

Back
Top