I tested your code as is and apart from switching of the excel processing I was able to get a file saved from the template with both Template:="C:Temp.....xltx" and also with just the file path "C:Temp.....xltx"
Here is a updated version of the code with late bindings removed. See if it runs better with your excel. tested with Excel 2016.
AddReference "microsoft.office.interop.excel.dll"
Imports XL = Microsoft.Office.Interop.Excel
'define the file to create/open
Dim myXLS_File As String = "C:\Temp\DocName.xlsx"'
Dim excelApp As XL.Application = GetObject("", "Excel.Application")
'set Excel to run visibly, change to True if you want to run it visibly
excelApp.Visible = False
'suppress prompts (such as the compatibility checker)
excelApp.DisplayAlerts = False
Dim excelWorkbook As XL.Workbook
'check for existing file
If Dir(myXLS_File) <> "" Then
'workbook exists, open it
excelWorkbook = excelApp.Workbooks.Open(myXLS_File)
Dim ExcelSheet As XL.Worksheet= excelWorkbook.Worksheets(1)
Else
'create a new spreadsheet from template
excelWorkbook = excelApp.Workbooks.Add (Template:= "C:\path\to\template.xltx")'
End If
excelWorkbook.SaveAs (myXLS_File)
excelWorkbook.Close
excelApp.Quit
'excelApp = Nothing
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan