Results 1 to 2 of 2
  1. #1
    Bcanfield83 is offline Advanced Beginner
    Windows 7 32bit Access 2016
    Join Date
    May 2018
    Posts
    81

    Question Check Excel Spreadsheet for records prior to importing into Access DB

    Hello,


    I'm looking to see the best way to go about the following:
    There's a .xlsx spreadsheet outputted to a network folder each month. The spreadsheet always has 3 worksheets, one of which is subject to change in terms of the data within. For example, there could be some months in which that particular worksheet has zero records on it - but would still have a header row regardless.
    If the worksheet doesn't have any actual records below the header row, there would be no need to import it into the Access DB.
    I'm able to program the actual import process through VBA, but not sure how to check to see if there are any records prior to importing - would this require the use of the Microsoft Excel Object Library/References?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,824
    Is the worksheet simple enough a link can be set? Does the output always have same filename? If you can have permanent link set then you can simply query the table to see if records exist. Otherwise, use Excel automation code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-20-2019, 11:38 AM
  2. Replies: 4
    Last Post: 03-16-2018, 12:37 AM
  3. Importing via VBA from Excel Spreadsheet into MS Access 2013
    By cdixon102419607 in forum Import/Export Data
    Replies: 2
    Last Post: 08-17-2017, 09:28 PM
  4. Replies: 3
    Last Post: 06-14-2016, 11:59 AM
  5. Importing Excel 2007 spreadsheet into Access 2002
    By jhjr in forum Import/Export Data
    Replies: 1
    Last Post: 06-17-2010, 02:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums