Importing Excel File

G

Guest

I was asked to import an Excel file into a Microsoft Access database. Some of
the fields in the Excel file are formatted as numbers. Without changing any
formats in the Excel file, how can I import all the data as text fields into
Access?

Thanks
 
J

John Nurick

Hi Steve,

See my answer to an almost identical question in this group on 4
October, from Linda, under the subject "How to import numbers from
Excel".
 
J

Jamie Collins

steve said:
I was asked to import an Excel file into a Microsoft Access database. Some of
the fields in the Excel file are formatted as numbers. Without changing any
formats in the Excel file, how can I import all the data as text fields into
Access?

SELECT
LEFT(MyExcelNumericCol, 255) AS MyJetTextCol
INTO
MyNewTable
FROM
[Excel 8.0;HDR=Yes;Database=C:\Tempo\db.xls;].[Sheet11$]
;

You also need to ensure Jet sees the Excel columns as numeric. See:

http://www.dicks-blog.com/excel/2004/06/external_data_m.html

Jamie.

--
 

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