+ Reply to Thread
Results 1 to 10 of 10

Extracting Data from Closed Workbook

  1. #1
    Registered User
    Join Date
    02-21-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Extracting Data from Closed Workbook

    Hi,

    I'm trying to extract data many Excel workbooks. The data isn't in a structured format but rather in specified cells, e.g. cell A3, C5, E7 and so on.

    The approach I've currently taken is to use the Workbooks.Open method to open each workbook, copy the data and close the workbook. However, I'm finding this method to be really slow as I have to open the workbooks which is stored on a network drive. Additionally, I have to loop through thousands of workbooks to extract data, therefore, this method is very time consuming. Is there an alternative method to extract data from workbooks which is faster?

    Thanks,
    Anthony

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Extracting Data from Closed Workbook

    If the sheet names and the cell address are known, you can use:

    1) Formula linked to those specific cells and convert to the value.
    or
    2) ExecuteExcel4Macro method.

  3. #3
    Registered User
    Join Date
    02-21-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Extracting Data from Closed Workbook

    Thanks. Will the ExecuteExcel4Macro method work on a closed workbook?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Extracting Data from Closed Workbook

    Both should be able to get the data from the closed workbook without opening.

  5. #5
    Registered User
    Join Date
    02-21-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Extracting Data from Closed Workbook

    I've just tried it out and it works although it's very slow. It's actually quicker to use the workbook.open method.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Extracting Data from Closed Workbook

    I don't know how you tried.
    I have not experienced such thing like slower than opening.
    So, I should say bad luck.
    Last edited by jindon; 04-08-2021 at 01:53 AM.

  7. #7
    Registered User
    Join Date
    02-21-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Extracting Data from Closed Workbook

    Do you know much about ADO connection and whether that might be quicker?

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

  9. #9
    Registered User
    Join Date
    02-21-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Extracting Data from Closed Workbook

    Thanks Jindon for your help. Much appreciated

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Extracting Data from Closed Workbook

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VB Code to copy data from closed workbook to another closed workbook
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2020, 01:40 PM
  2. [SOLVED] Extracting Data from a closed workbook
    By dprobst in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-19-2017, 01:34 PM
  3. Extracting Data from Closed workbook
    By ueranda in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-23-2016, 10:27 AM
  4. [SOLVED] Extracting values from latest closed workbook into current workbook?
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2015, 09:34 PM
  5. extracting data from closed workbook
    By sark in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-20-2014, 01:18 AM
  6. Replies: 0
    Last Post: 03-27-2014, 12:38 PM
  7. [SOLVED] Extracting data from a closed workbook
    By Barb Reinhardt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2006, 10:50 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1