Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multi sheet Import Code (2000 sp3)

    Hans,
    You, (and others) assisted recently with the attached code. The code is to read files that are in CSV (or other delineated files). It will read, parse, and go to the next file. I am running into a situation where while the code runs, it will get to a point and say " out of memory' I think this is within the code. Perhaps it is not resetting the arrays to zero?

    Any help would be appreciated,

    Thanks,
    Brad

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multi sheet Import Code (2000 sp3)

    You could insert a line Erase sArray just before the end of ImportMultSheets, but I don't know if it will help. You may have to import the files in small groups, or even one by one.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Multi sheet Import Code (2000 sp3)

    Perhaps the arrays are just getting too large to handle it and you need an alternate approach. You can try Importing Huge Data Files

    This approach does not use arrays, but instead fills in line by line. It would be a little slower, but it shouldn't have the memory problems...

    Steve

  4. #4
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multi sheet Import Code (2000 sp3)

    Thanks to all.
    I will certainly look at the second tip as well. I inserted the erase sArray command. Also, I reduced the lLimit = 65536 to 20000. This helped. For the files I am using this on I will never exceed the 20000 lines per file.

    Thanks again,
    Brad

Posting Permissions

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