Re: Importing Excel Data - Recognizing Headers
- From: "Ken Snell \(MVP\)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Jul 2007 17:44:11 -0400
Actually, you can browse to the file's location, but it requires the use of
some VBA code that the macro would call. If you want to pursue this concept,
post back.
--
Ken Snell
<MS ACCESS MVP>
"Ken Hudson" <KenHudson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F37FE4E0-A34D-4F7F-ADD6-03389EC4D2AF@xxxxxxxxxxxxxxxx
Hi Ken,
Thanks for the feedback.
Just trying to avoid having to cllick the checkbox. I will be sending this
out to scores of users and the fewer keystrokes/clicks they have to do,
the
less chance for error.
The TransferSpread*** option would work, but each user will be storing
the
workbook somewhere on their individual network. The macro requires a
specific
path and filename I believe. You can't "browse" to it.
--
Ken Hudson
"Ken Snell (MVP)" wrote:
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
.
- References:
- Re: Importing Excel Data - Recognizing Headers
- From: Ken Snell \(MVP\)
- Re: Importing Excel Data - Recognizing Headers
- Prev by Date: Re: Importing Excel Data - Recognizing Headers
- Next by Date: Re: Import Text with Spec File
- Previous by thread: Re: Importing Excel Data - Recognizing Headers
- Next by thread: Re: Can't edit import spec?
- Index(es):