Excel import specification

G

Guest

I am trying to create an import from excel in Access2002. I can select the
file I want using the Import. I tell it to import to existing table, first
row has field names but there is no place to name the import spec for later
use. Where is the spec stored so I can edit it. I have system and hidden
objects displayed but there is no file named MSysIMEXSpecs. Any help would be
appreciated.
Mark
 
F

fredg

I am trying to create an import from excel in Access2002. I can select the
file I want using the Import. I tell it to import to existing table, first
row has field names but there is no place to name the import spec for later
use. Where is the spec stored so I can edit it. I have system and hidden
objects displayed but there is no file named MSysIMEXSpecs. Any help would be
appreciated.
Mark

The Import Specification name is needed when you use TransferText to
import a text file, not if you use TransferSpreadsheet to import from
Excel.

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"MyImportTable", "c:\My Household\OrderEntry.xls", False,
"MyDataQuery!K1:K3"

The above will import, from an Excel spreadsheet, a range of data into
an Access table, using the first row of data as Access field names.

Look up the TransferSpreadsheet method in VBA help for the necessary
arguments.
 
G

Guest

Thanks for the insight. Having used text import in the past I couldnt
mentally get past their being a difference.
 

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

Top