Parsing a text file and sending a value to an excel worksheet
Posted on 2007-07-30
I have a large text file that I will need to parse through on a daily basis searching for one value. That value will then need to be sent to an excel spreadsheet and pasted into cell A1.
In the text file I can search for the words "Grans UnTraced" and I know that I need to grab the next number after that. For example, here's what that section of the text file looks like.
0.00 653.60 100.14 141.48 10,188.64
Grand UnTraced: 50,690,470.29 30,706,358.74 13,584,834.09
I dont know what the exact paths of the text/excel file will be but for now lets just assume the txt file is located at c:\textfile\filename.txt and the excel is located at c:\excelfile\filename.xls.