WRT using TT I've done something similar aeons ago using it to interpolate values from a CSV into an OpenOffice SXC (similarly structured zip'd XML files; the workflow allowed for a special template SXC file with embedded TT markup in the desired cells) in order to be able to call OO's automation routines to evaluate embedded functions before exporting the resulting file as an xls(x? been a while). It worked fairly well for quite some time.
The cake is a lie.
The cake is a lie.
The cake is a lie.