Solved

Import data rows only

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

730 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