+ Reply to Thread
Results 1 to 3 of 3

Need help to loop macro to import 100k rows per sheet until end.

  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    88

    Need help to loop macro to import 100k rows per sheet until end.

    Hi Everyone

    I need help from anyone to edit this macro so that it will import 100,000 rows in one sheet then continue importing in another sheet another 100,000 rows and loop till all 3 million lines in my text file is imported into whatever amount of sheets needed in a single workbook.

    Please Login or Register  to view this content.
    Thanks in advance.

  2. #2
    Registered User
    Join Date
    05-09-2012
    Location
    Des Moines, IA
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Need help to loop macro to import 100k rows per sheet until end.

    You can use Microsoft Scripting Runtime (scrrun.dll) for the file access. Just go to tools -> references and select "Microsoft Scripting Runtime", or browse for "scrrun.dll". Then the following should meet your needs. Note, however, that if your text file has strings in quotes, the split function will not return what you want. In that case you will need a more complicated function to split each line into individual cells.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-05-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need help to loop macro to import 100k rows per sheet until end.

    Hi baldphil

    Thanks for your code, it seems to work, but still processing and will take some time to end, could you also add a counter which will display the progress of the rows imported such as seen in this macro:-

    Please Login or Register  to view this content.
    Thank you.

+ 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