Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import excel datasheet 1

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG
Is there any formula with which to import an Excel datasheet amd comvert it into a table?
The Excel file is named BPreise and has the following columns:

Artikel-Nr Spund-Produkt DDU Neu DDU


I want to make a table with the same titles and fields.
 
Hi!

Try:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "YourTableName", "YourFilePathAndName", Yes

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Your code works fine.I wonder could i also specify the folloiwng:
Your code creates a new table where the first
field is called F1 and the second F2.
i want the first field to be called "Code" and the second field "grade".Also i want the first field to be a number and not txt
Is it possible to extend the code ?

 
Hi!

Sorry, the final Yes should read True instead and that will make Access read the first row as field names. As for the second question you can use acLink instead of acImport. In this case Access will link to the spreadsheet and will use the information in each column to try and determine the data type.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top