Sub generateZMLMTemplate()
' create new tab name upload
Sheets.Add.Name = "Upload"
' Copy table containing template data in value in this new tab
With Sheets("Automatic Template")
'.Range("Tb_Template[#All]").Copy
.Range("Tb_Template[[#All],[MATNR]:[PIR_Data]]").Copy
End With
With Sheets("Upload")
.Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' Remove stop column
.Range("AH1").EntireColumn.Delete
End With
' Move the tab in a new excel file
Sheets("Upload").Move
MsgBox "Template created"
End Sub