Hi deeps,
If the code is going to be across more than one site, the best place to put this is probably in the Data Dictionary. Alfresco already provides a location (Repository->Data Dictionary->Node Templates) for storing templates, and this location also gives the added benefit that Share also uses it to drive the "Create document from template" functionality from the Create button in the document library - so if you want to manually create documents using this template this gives you this option as well.
If you don't want users to be able to manually create documents based on the template, you can easily create a new folder of your own (e.g. System Templates or whatever you like) within the Data Dictionary instead. All you'll need in your logic is the NodeRef of the template file to pass to the CopyService, so essentially you can put the templates anywhere you like, but the Data Dictionary is a good place for content like this that's system wide.
If the templates are site-specific (e.g. different sites need different templates), then it may make sense to use a convention and create a static named folder within each site's document library where the templates will live, but this is more manual work every time a site is set up and is prone to breaking (e.g. accidental deletion).
If you've gotten the hang of the POI libraries, then your 1st challenge shouldn't be too bad, although writing the updated content might be a little tricky as Alfresco won't allow the POI library to modify the content directly since it treats content as completely immutable. Probably what you need to do is something like:
<ol>
<li>Use the CopyService to create the new node from the template</li>
<li>Get the new node's content using the ContentService.getContentReader() – you may want to consider writing to a temp file if you don't want to hold the entire file in memory</li>
<li>do your POI replacements and use ContentService.getContentWriter() on your new node to update the content – call writer.putContent() to stream in the content either from memory or from your temp file</li>
<li>Repeat!</li>
</ol>
Regards
Steven