+ Reply to Thread
Results 1 to 11 of 11

Problems with reading stuff from closed files

  1. #1
    Registered User
    Join Date
    12-17-2007
    Posts
    2

    How to retrieve data from other excel files?

    Hi,
    I would like to create a single excel file, which is composed by fragments of different (closed) excel fies (it should take some data from the files).
    Is that possible?
    Thanks

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Try to see this URL:
    http://www.rondebruin.nl/copy7.htm

    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    12-19-2007
    Posts
    1

    Problems with reading stuff from closed files

    Hello,

    Yesterday, I asked how to read stuff from closed files.
    Someone kindly suggested the following link:

    http://www.rondebruin.nl/copy7.htm

    I tried that and it worked, the problem is that it's too slow.
    In the main sub, it uses DoEvents (which yields the processor), which is what I believe that causes it to be slow.
    1) Is it necessary to use the wait operation?
    2) Do you know faster / other ways to read data from (many) other xls files?

    Thanks a lot!

  4. #4
    Registered User
    Join Date
    12-20-2007
    Posts
    1

    Problems with reading stuff from closed files

    Hello,

    Yesterday, I asked how to read stuff from closed files.
    Someone kindly suggested the following link:

    http://www.rondebruin.nl/copy7.htm
    I tried that and it worked, the problem is that it's too slow.
    In the main sub, it uses DoEvents (which yields the processor), which is what I believe that causes it to be slow.
    1) Is it necessary to use the wait operation?
    2) Do you know faster / other ways to read data from (many) other xls files?

    Thanks a lot!

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello bluesdata3,

    It would help to know how slow is slow? There are other methods of data retrieval from a closed workbook, but selecting the best method depends on several factors. It would be best for you to post your workbook so a workable solution can be suggested.

    Sincerely,
    Leith Ross

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834
    Let's see if this is any faster
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-20-2007
    Posts
    1
    one more thing, is it possible just to put the 'wait' section in a comment?
    thanks

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834
    How about
    Please Login or Register  to view this content.
    Why ?
    What you are doing is just reading the block of range into the same size of the range.
    No need to use Array Formula. and Do Events

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834
    You code is using FormulaArray, which doesn't need to be an array formula.
    Array formula needs more time to calculate.

    Show me the code that you are calling this sub routine.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834
    oops missed a "."

    Please Login or Register  to view this content.
    Last edited by jindon; 12-20-2007 at 04:26 AM.

  11. #11
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please use forum rules below and then stop spamming the same question under these user names

    Also note rules 5 about wrapping code. If you ignore the rules your threads may be locked or even deleted

    bluesdata, bluesdata1, bluesdata2, bluesdata3, bluesdata4

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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