Solved
Forum Discussion
"of undefined" in the error message is telling you that the function was unable to get your Excel sheet so it has no reference for the CellByName call.
Did you use the Convert To Script function to get this code or did you write it separately? If you didn't use Convert To Script function, then I suggest trying that and seeing what code TestComplete gives you.
If you did use that convert function, be sure and run this script in the spot in your test where it has access to all the variables that it needs. Running it stand alone may not work.
I did use convert to script. The excel path is ProjectSuite.Path + *sheet name*. I don't know why it would be accessible within the project via Keyword tests but not by Script tests.