+ Reply to Thread
Results 1 to 2 of 2

Processing Data

  1. #1
    Registered User
    Join Date
    01-07-2009
    Location
    Coventry, England
    MS-Off Ver
    Excel 365
    Posts
    58

    Processing Data

    Hey guys,

    I have a new question for you. This time is a "how to..?" question. Here's what i want to do.
    I have a file containing up to 500 or more lines (it can get quite big). This text file has a structure that looks like this:

    "
    Name of the item : ball
    Quantity of items : 300
    Color of the item : red
    Size of the item : quite big
    ... (more lines like the ones above)
    ---------------------------
    -------Description----------
    Weight : 100 Height : 30
    Length : 30
    "

    And so on. Multiply that by 50-80 and you'll get the file. Now.. i do have a form in which i get to paste one item at a time (in a text box called TboxI) and my form will spread the data in the cells (a2 = name, b2 = quantity and so on).
    Here comes my problem. Is it possible to apply this form to the whole file? Not with copy-paste but by reading the file and doing it automatically. First let me tell you a bit about the code: the code i have in this form will cycle the text and seek each item in turn until it finishes the text. It will cycle the text for like 10 times or so, seeking each item.
    I think i can make it remove the line after it finds each item with this code
    Please Login or Register  to view this content.
    where
    Please Login or Register  to view this content.
    but i still don't know how to tackle the file issue.
    I found some code for reading the file and i might be able to make it work but what i'm asking here is an approach question.
    Does anyone have any other idea on how to approach the problem?

  2. #2
    Registered User
    Join Date
    01-07-2009
    Location
    Coventry, England
    MS-Off Ver
    Excel 365
    Posts
    58

    Re: Processing Data

    right..so many answers.
    Anyway, i did manage to find an idea. I just put all the processing in a function processing(pText) where pText was the text either from the text box or the file. I put a separator on the file so that it can read only one recording at a time.
    I have another question though. How do you make the variable in which you store the file understand the text the right way?
    This is the code i use in the procedure that calls the function:
    Please Login or Register  to view this content.
    am i doing it wrong?

+ 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