Solved

Import data rows only

Posted on 2013-06-19
3
481 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) 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 85

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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

718 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