+ Reply to Thread
Results 1 to 9 of 9

Error at partial input of large text file at line 5630 out of <64000

  1. #1
    Registered User
    Join Date
    03-26-2010
    Location
    Northern CA, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Error at partial input of large text file at line 5630 out of <64000

    This is the first step in taking a large text file that has been broken up into smaller chunks, and rearranging for a MYSQL database.

    At line 5630 it stops and gives the error.

    Run-time error '1004':


    Application-defined or object-defined error

    When I do the debug it highlights the code at the following line:

    Please Login or Register  to view this content.
    In :

    Please Login or Register  to view this content.
    The file looks fine at the point where it stops.

    The next step is to select values from each record but if I can only read in 5000 lines no need to work on that part, some of the records have more than 64000 lines so that is why I am using the line input command.

    Thanks for any help or ideas, this is my first post to this forum so I apologize ahead of time if I didn't get format correct on posting a problem,

    Patrick

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,626

    Re: Error at partial input of large text file at line 5630 out of <64000

    Did you dim nextrow as Integer or Long?
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    03-26-2010
    Location
    Northern CA, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Error at partial input of large text file at line 5630 out of <64000

    Thanks for your interest.

    I actually didn't dim next row. What do you suggest, a long integer? But I don't think that is the problem since, I also found that it was able to go up to 65536 on another record. So there must be something hidden in that record that Excel doesn't like. Most of the records are less than 5000 lines so I thought it was a problem with the size until I decided to try a larger file.

    Thanks,

    Patrick

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Error at partial input of large text file at line 5630 out of <64000

    You should declare all of your variables, and put Option Explicit at the top of every module to remind you.

    What's the value of Data when the code falls over?
    Last edited by shg; 03-26-2010 at 04:51 PM.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    03-26-2010
    Location
    Northern CA, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Error at partial input of large text file at line 5630 out of <64000

    The value of the data when the error occurred was:

    "2-oxoglutarate + [dihydrolipoyllysine-residue succinyltransferase] lipoyllysine
    = [dihydrolipoyllysine-residue succinyltransferase] S-
    succinyldihydrolipoyllysine + CO2"

    but it wasn't wrapping or wasn't enclosed in quotes.

    So I then deleted the hard returns so it was on one line and it continued to line 65536

    "2-oxoglutarate + [dihydrolipoyllysine-residue succinyltransferase] lipoyllysine = [dihydrolipoyllysine-residue succinyltransferase] S-succinyldihydrolipoyllysine + CO2"

    There are other lines that aren't in quotes but this line seems to cause a problem. I wonder if it is caused because the break occurred right before the equals sign.

    Thanks for your help.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Error at partial input of large text file at line 5630 out of <64000

    Much as I hate to ask, can you zip and post the text file?

    Can I assume that the problem should occur if I do nothing other than replicate that one piece of code?

    I have a suspicion, but need to try it.

    EDIT: The problem at line 65536 is that you've run out of rows.
    Last edited by shg; 03-26-2010 at 06:58 PM.

  7. #7
    Registered User
    Join Date
    03-26-2010
    Location
    Northern CA, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Error at partial input of large text file at line 5630 out of <64000

    Shg,

    I am just heading out, I will be able to send you the code after my commute home.

    By the way, which college football team do you side with on Thanksgiving week since your in Texas?

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Error at partial input of large text file at line 5630 out of <64000

    Baylor, then any Big 12 team.

  9. #9
    Registered User
    Join Date
    03-26-2010
    Location
    Northern CA, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Error at partial input of large text file at line 5630 out of <64000

    I got my graduate degree from A&M.

    Here is the text file with only a partial of the fifth record so it is not so big. It still has a problem with that same line.

    Thanks again for your help.

    I am now working on parsing out the various categories into columns that I want so I can import it into a MYSQL database.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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