×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Formatting plain text

Formatting plain text

Formatting plain text

(OP)
Hi. I have some data in a text file, and I need some help to format it. The data is not split into lines, but is deliminated by semi-colons. I need to split it into lines after each semi-colon, then read each value so that I can use it in a program.

eg. 123 f507 287; e23 234 453; 453 543 d34; 453 345 345;

If I split the data into lines, it may generate over 5000 lines of code. Any example codes are apprciated.

Cheers,
 

RE: Formatting plain text

Use the split function
Dim MyData() as string
MyData=Split(YourData,";")
Then each element of MyData contains a value
eg
For i = 0 to ubound(MyData)
 'do your stuff with MyData(i)
next

RE: Formatting plain text

(OP)
Thanks Francis.
I will try it over the weekend, and let you know how it turns out.

RE: Formatting plain text

(OP)
Ok. Thanks. Eventually got it to work.
Now I am just working on a progress bar for it.

Cheers.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources