LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parsing log file and copying max value data into excel

Hello,

I need to parse a log file and copy the parsed data into an excel sheet (should do it in multiple tabs - one tab with all the data and another main tab should have the Passed data alone). I have attached a sample log file here. Also, out of the 3 measurements in the log file, since 1 and 3 failed, I need to to have the 2nd all_passed data in the main tab of the excel sheet. The code should intelligently look for failures under the same header and copy only the all_passed data in the main tab of the excel sheet. Also, from the same type, it should find the one with the max value for ITEM_6 and copy it in the main tab of the excel sheet

i.e the main tab of the excel sheet should have 

Column_1            Column_2

MY_DATA 099           5.5

MY_DATA 199           4.5

because for MY_DATA 099, 5.5 is the max value (of ITEM_6) out of the two all_passes (it was 5.5 and 2.5) and for MY_DATA 199, 4.5 is the only one with all_pass

thanks for your help

kf

0 Kudos
Message 1 of 6
(2,971 Views)
You didn't attach your code or explain exactly what you are having problems with? Are you using the Report Generation Toolkit to write to Excel?
0 Kudos
Message 2 of 6
(2,969 Views)

No I am not using the Report Generation Tool to write to excel. Is that the best and easiest one to use

I dont have a working code yet. All I am doing is using the MatchPattern.vi and trying to match the names to find the values. The code is getting bigger and complicated and I dont have a looping yet.

I used the MatchPattern.vi to remove all the header text I have in my logfile which I have eliminated from the attached sample log file.

My main issues are

1. how I would find the presence of "<-DidNotPass" in one section

2. how I would send all data to excel

3. how I would parse out the max passed data and report that in the main tab

thanks for the help

kf

0 Kudos
Message 3 of 6
(2,962 Views)
I'm not sure my phone is displaying your text file correctly. Is each record the same length? Is the status always there and in the same column or same row?
0 Kudos
Message 4 of 6
(2,953 Views)

Yes, each record is the same length and the status is always there in the same column/row

0 Kudos
Message 5 of 6
(2,940 Views)

For writing to excel, search the examples for either "excel" or "activex", I think either one will find an example of writing to excel - but you will have to modify the example because, as I recall, all the data is put on one worksheet.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 6
(2,935 Views)