Solved

Is there a utility to parse a fixed length string?

Posted on 2000-05-12
4
224 Views
Last Modified: 2008-02-26
I don't know if this is the right area to ask this question but here goes.

I don't have VB - but I guess I can get hold of compiled VB programmes that will run (I do have M$ Office and can run VBA).

I have a number of individual fixed length record strings (approx 7,500 chara's).
I don't have yet, but will have, the record mapping - I believe I'll need approx 50 fields from the string.
I'd like to map these fields onto several rows so that they look like a conventional ascii report within say 180 chara width.
Is there a VB utility in existance that allows a non VB programmer to specify the field locations from a long record string and allow some sort of mapping to an output file?

0
Comment
Question by:capital052798
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
jsimoni earned 50 total points
ID: 2805168
if i understand your question correctly, you should use MS Access which comes with Office.  You can import your files into Access.  You can then use the Access Report Wizard to create your layout of your ASCII text file.  Once this is complete you can Export your report to a text file.
0
 

Expert Comment

by:woodsrr
ID: 2805172
Use Excel:

1. Do a file open
2. Point to the file

Excel will popup the Text Import Wizard
You can now import the data using delimited or fixed width.

From what you have descriped, you will use fixed width.
0
 

Author Comment

by:capital052798
ID: 2805204
mmm
I actually use the Access function you talk about quite a bit BUT I just wonder if Access can cope with 7,500 chara's - I assumed it didn't but I'll give it a try.
0
 

Author Comment

by:capital052798
ID: 2841483
To my surprise MS Access was able to do the job - I would still have liked a compiled routine thoug because I need this to run on machines that don't have MS Office.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question