09-06-2013 08:20 PM
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
09-06-2013 08:31 PM
09-06-2013 08:56 PM
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
09-06-2013 09:46 PM
09-07-2013 01:45 AM
Yes, each record is the same length and the status is always there in the same column/row
09-07-2013 02:41 AM
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...