Yes, absolutely. A script can do this in PixInsight and much more. Actually, you can do everything you do in Excel and other spreadsheet applications with a script, probably much better. Can you provide information on the template format you want to use?