Hi guys:
This is my work assignment. I can really use some good advices right now.
I have a ASCII file can be opened with Notepad, and this file have 4500 columns of plain text data. I also have another file called layout file in CSV format gives me the layout information of the ASCII file.
Here is a piece of the layout file:
Respondent.Serial,Serial number,,,,
Type: Long,,,,,
,,,,Card: 0,Cols: 1-8
As you can see this information show from column 1-8 of the ASCII file, is the data called Serial number.
I just need to use comma to separate the columns of the ASCII file by using the correct column index from the layout file, and also at the top of the new data CSV file also have to the proper name of that piece of data, in this case is the Serial number.
I don't want do spend a week to align this ASCII file, which only have 450 something rows manually. And of cause if I don't write some codes this time, next time this kind data given to me again, I will again suffer. There are about 1000 commas I have add for each row of the ASCII file.
Appreciate all your knowledge and thoughts
Zli034
In reply to Please help me with this ASCII file parsing assignment by zli034
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |