I think you will get a better response on the expressions forum, some of the guys of over there are familiar with scripting.
Johnny Cuevas, Editor
"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.
There's a script called "compsfromspreadsheet" on aescripts.com that does that. You just fill in the filenames and text, etc. on the spreadsheet and it replaces everything and creates new comps from your template comp. I've used it a few times and it works great, but you have to be careful about spelling, capitalization, etc. because it will stall on any errors.