08-24-2008 01:09 PM
08-24-2008 01:46 PM
Hi Sendtohen,
i think you can use the read from spreadsheet file function. You will get an 2D array of your data with which you can work then. You can delete the empty elements between elements with data and work with it. I think your data format change in line "Sys_alarm" is it correct? I think til there you need a 2d Array and all other values are single ones.
Mike
08-24-2008 01:59 PM
Thanks for the quick reply. Maybe, I didn't describe my problem clearly. Because of different number of spaces it returns, I can't really just read in using the spreadsheet function. The data would be in different cells all the time, because of different number of digits. This is one of the reason why I am having such a hard time with this parsing.
Henry
08-24-2008 02:23 PM - edited 08-24-2008 02:25 PM
Hi Henry,
i understand it. But you can first read your file with it. You can also read it as a "normal" text file. I played with your file and attached you can find a picture which shows how it´s possible to replace the multiple spaces with only one space.
Hope it helps.
Mike
08-24-2008 02:32 PM - edited 08-24-2008 02:32 PM
I think a considerably easier solution is to use the Scan From String function. You can read in the file into a string and then separate at linefeeds to give you an array. You can then auto-index this array into a for-loop and parse it out as you need it. For example, to parse out the line that contains "POS":
The output cluster contains the numbers -531, -8292, and 0.
You will need to determine what data you want and how you want to "package it" for program use.
08-24-2008 03:05 PM
Thanks for all the help. You guys have given me different ideas on solving this problem. It is very much appreciated.