Re: Importing Excel Data - Recognizing Headers
- From: "Ken Snell \(MVP\)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Jul 2007 14:21:03 -0400
Best way to do this is to use TransferSpread*** action (macro or VBA) in
ACCESS and set the HasFieldNames argument to True. That will "force" ACCESS
to see that first row as having headers in them.
I'm not completely sure, but I'm guessing that ACCESS / Jet decide whether
the first row has field names in it by scanning the first x rows and looking
to see if data type changes as you go from the first row to the second row
in a column.
Are you trying to automate this process? Or just that you wish to avoid
having to manually check the "field names in first row" checkbox during the
import?
--
Ken Snell
<MS ACCESS MVP>
"Ken Hudson" <KenHudson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DB9EAA6D-2CC5-4763-AE06-A2E25C0398A4@xxxxxxxxxxxxxxxx
I posted this questoin in the Excel group but didn't get a response.
Perhaps
someone here has answer.
I have an Excel macro that creates a workbook with column headings in row
one.
Data is listed in rows two and below.
When I go into Access and import the Excel workbook, the import wizard
opens. The first screen of the wizard looks for column headers and, if
Access
"senses" that headers are present, it automatically checks the "first row
contains column headings" box.
I have two workbooks that look pretty much the same to me but Accees
recognizes headers in one and not the other.
Is there some kind of formatting or other trick I can use in the Excel
macro
to make Access always recognize headers in this workbook?
--
Ken Hudson
.
- Prev by Date: RE: Importing Excel Data - Recognizing Headers
- Next by Date: Re: Importing Excel Data - Recognizing Headers
- Previous by thread: RE: Importing Excel Data - Recognizing Headers
- Next by thread: Re: Importing Excel Data - Recognizing Headers
- Index(es):