Solved

Import data rows only

Posted on 2013-06-19
3
473 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error in Rs.MoveNext & Duplication of Record 14 25
Sub Reports 8 21
Operation must use an updatable query 4 24
My Query is not giving correct result. Please help 5 29
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…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
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 stored procedures 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 Micr…

911 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

22 Experts available now in Live!

Get 1:1 Help Now