AutoIt can't create an Excel file directly - it, or you, will have to open the workbook.
AutoIt also can't read a text file without opening it. It doesn't require that you have it open in an editor.
$workfile_name = FileOpenDialog("Find a file to read","C:\","All (*.*)|Text files (*.txt)")
$workfile = fileopen($workfile_name, 0)
These two lines allow you to browse to the test file.
$look_for = InputBox ( "title", "prompt", "default")
This line asks the user what text is being searched for.
You can see the meanings of the fields in the AutoIt help file.
$inputline = filereadline($workfile,1)
This line reads the first line from the file that was chosen
while(True)
if (@error = -1) then exitloop
do stuff
$inputline = filereadline($workfile)
wend
These lines loop through all the lines in the text file.
The do stuff portion is the tricky part.
You can use the StringInStr() function to match the $look_for against the $inputline. Use an If statement, and if there is a match, and if the next line is always skipped, read a line into a second variable and then read the next line into the same variable.
Do an exitloop at the end of the If statement to stop reading once you have found what you are looking for.
After the loop you can run Excel; there's an example of how to run programs in the Tutorial section of the Help files under Simple Notepad Automation. It's more effort that I care to undertake to create the part of the program that interacts with you about whether to create a new workbook, open an existing one, and where in the workbook you want the data.
You can use Send() function to send a Ctrl-g to Excel to then set the destination cell in the active worksheet. SendI() is described in the Function Reference section of AutoIt help under the Keyboard management subsection. Note that it will attempt to send to the Active window; there is a function SendKeepActive() that will try to force an identified window to be active while Send() is working. Look for the section "Window Titles and Text (Advanced)" to determine how to tell AutoIt which window you want to send to. This is in the "Using AutoIt" section.