Thread: parsing text
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
[email protected] yang__lee@ausi.com is offline
external usenet poster
 
Posts: 1
Default parsing text

Hi,

I hope you may help me.

Please check the attached text file.
Actually its a report file with some headers information
and them report is in tabular format. I want to parse each row
and get the values.

I think strtok won't work here.

There are no tabs in between the column values they are spaces.
Column values them selves contain spaces but they are single spaces.
Minimum two spaces are there between column values.

can you suggest some algorithm in C or any other method to get each
column value.



In excel I try to create a delimited file but its unsuccessful. How to
do it in excel.

Thanks,

lee


following content is in a text file. Copy in a text file
Keep wordwrap off
-------------------------------------------------------------------------------




DATE: 04/07/2007

TMK

MTC_PROC REPORT

Area: KTO
WRKPCK: KTO


PROCESS PNAME FEANAME CEB MCO DPNUM NM_ITM
ERROR
TXT_GUI ERROID
_______ ___________ _____________ ___ ___ ______ __________
________________________________________________
__________________________________________________ __________ ______

RECKKON 206 DEVICE 007 997 532533 532533
Invalid source. BREAK needed. Count: 1501-1505
Source: -98 0201

RECKKON U206 DEVICE 007 997 532533 532533
Invalid source. BREAK needed. Count:
1421,1726-1730 Source: -98 0201

RECKKON F77 CROSS CNNCT 009 997 520624 520624
Feeder feature. Count: AM992,651-900
Source: 520619 7310

RECKKON F1727 X-MIC 009 997 521184 521184
Sourced Out. Count: SA5211,1-1800
Source: 0 0206

RECKKON F115 CROSS CNNCT 009 997 522306 522306
provide feed. Count:
1400,1001-1100 Source: 522333 7310