Solved

Import data rows only

Posted on 2013-06-19
3
470 Views
Last Modified: 2013-06-21
I have an Excel spreadsheet that I link to from Access.  The spreadsheet has 8 rows of header data and the 9th row is the actual field header.  Also the last row has a Total that I do now want to import either.  How do I make Access recognize the header row and then import the recordsets into a table with appropriately named columns?  The spreadsheet is attached.
12037-bom-assembly.zip
0
Comment
Question by:gibneyt
3 Comments
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 100 total points
ID: 39261294
you can use the TransferSpreadsheet command

docmd.transferspreadsheet acimport, 8, "tblBOM", "c:\FolderName\12037_bom_assembly.xls",True,"BOM!A9:P91"
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 400 total points
ID: 39261711
Also note that in many cases it's simpler to import to a "staging" table in Access, and then use standard SQL and VBA to parse out the data you want.
0
 

Author Closing Comment

by:gibneyt
ID: 39265657
The staging process will work.  As it turns out the header data is useful so another query will parse the db specific records into another table and leave the raw table for cherry picking that information.  capricorn1's suggested transferspreadsheet would also work to bring in the whole sheeet so partial credit is due there too.  Thanks both for the quick turn around.

Tim
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now