Read Data from Excel 2007

A

A. J.

Hi,

I have an Access database program to read the data from the Excel files and
insert the data into one of the table. Both of the Access database and Excel
files were created in 2003 version and they worked well in the MS 2003
version. Now I have a 2007 version, and try to do the same process. After I
run the database program, no data were loaded in the database table.

I manually click on the excel file (2003 version), only the 2007 excel
background file open but not the excel workbook file. I converted the 2003
version excel file to 2007 version, and click on it, still the file cannot be
opened. I found a way to open the file manually by opening the 2007 excel
program first, then select and open the file. But when the database program
opens the Excel file to read the data, how can the database manually to do
it? If the excel file cannot open, how can the program read the data from the
excel file?

I thought it is a question based on Excel. So I post this question on the
Excel forum. The reply I got said it is not from the Excel.

How can I do? Please help me. Thanks!
 
T

Tom Wickerath

Hi A. J.,

You should not need to first open the file using Excel before being able to
link or import the data into Access. You can establish a linked table to the
worksheet. I recommend defining a named range within Excel first. You can
also use the TransferSpreadsheet method of the DoCmd object, ie.
DoCmd.TransferSpreadsheet. You would use the constant acImport as one of the
required parameters.

Another alternative is to create a SELECT statement (ie. a query) that reads
the data directly. Access MVP Ken Snell has a tip on how to accomplish this:

http://www.accessmvp.com/KDSnell/EXCEL_ImpExp.htm


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________
 

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