How to extract columns/rows of values from a text file?
I have a text file in this format:
I need to extract the number that I need depending on which variables (letters) I'm comparing. For example, I need the value for A and U, so the value I need to look up for or extract is 1. For C and C, I will need to extract 3, and so on and so forth. I need a program that can look up this table automatically and extract what I need. May I know how do I do that?
Say a row = a line and a column a word on that line.
Create a 2 dim array with first dim >= number of lines in file
Read in file and parse words of each line into an array and add that array to the first array at its line number.
Now you can get the contents of each row and column by indexing the 2 dim array.