I would like to suggest the following two options :
1)If you are saving the each invoice as a separate file, then use following formula in your template :
a)In cell A1 : =CELL("filename",B1)==> This cell can be hide and set print so row#1 does not print
b)If A3 is the field name "Invoice Number", then pls put following formula in B3:
YEAR(TODAY())&"-"&MONTH(TODAY())&"-"&MID(A1,FIND("[",A1,1)+1,4)
c)Ensure to save the template as a excel file with the numeric file name starting with "0001"
2)You can make a database and printing template in a single excel file by using "offset" formula. If you need to have a look of such sample dabase, pls inform your mail add.
Check and share your experience.