Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    29

    Unanswered: Remove specific rows of excel file when importing to Access table

    Hello everyone.

    Have a "unique" question. I have a database that requires the import of two Excel files that are obtained from an internal web source. When this data is exported from the source, it has some rows at the top and bottom of data. Its always the same amount of rows at the top and bottom. The difference is the row #'s at the bottom will always be different depending on the number of results that are exported....but its ALWAYS the last 4 rows and first 4 rows that typically need to be removed.

    What I would like to know is, is there a way in Access to REMOVE these rows before Access Processes and imports the data to the Access Tables?

    Ive looked and tried this anyway I knew how, but cant seem to figure it out.

    Basically, the logic i would think would be....

    xls file is saved on desktop.
    Access is opened, and Button on form is clicked to import file
    Access picks file up and reomves Rows 1-3 and then the last 4 rows of data.
    Access then processes and appends data to Table.
    Done.

    THanks for your help!

  2. #2
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    Look into Automation, so that you code Access to take control of Excel. You can then use Excel properties and methods (e.g. ActiveCell) within scripts in Access to control which cells are used and which are ignored.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •